A normal pulumi up can't rebuild the cluster: bootstrap commands run once, the later stacks' state describes the old cluster, and monitoring's import options fail on a fresh one.
1.6 KiB
1.6 KiB
k8s-bootstrap
Decisions the code doesn't explain
- Everything goes through
controlPlaneVipAddressexcept master-1's own install. master-1 is installed with--cluster-initand a--tls-sanfor bothmaster1Ipand the VIP. The stack then waits forhttps://<controlPlaneVipAddress>:6443/healthzbefore anyone joins, because master-2, master-3 and the workers all join via the VIP, and the exportedkubeconfigpoints at it. - The VIP is pfSense + HAProxy, set up by hand, not kube-vip.
03-k8s-infra's kube-vip DaemonSet only handles Service/LoadBalancer VIPs. Don't propose kube-vipcp_enablefor API access: it was considered and rejected, see the decision record. The manual pfSense steps are in the runbook. - Workers get a dedicated Longhorn disk. The
scsi1disk is formatted ext4 (if not already) and mounted at/mnt/longhorn-extravia/etc/fstab.03-k8s-infralater registers it as an extra Longhorn disk, which keeps Longhorn off the root filesystem and avoidsDiskPressure.
Running against live VMs
Re-running this stack restarts the bootstrap sequence against already-provisioned VMs. That's why it only deploys via manual dispatch. For changes to the running cluster, write the code for a fresh bootstrap and give separate manual steps. To rebuild the whole cluster, follow the rebuild runbook.
The SSH key comes from proxmox-infra's first pulumi up. VMs created before that need the public key added to ~/.ssh/authorized_keys by hand.