The easiest way to bootstrap a self-hosted High Availability Kubernetes cluster. A fully automated HA k3s etcd install with kube-vip, MetalLB, and more. Build. Destroy. Repeat.
When we use an external data source instead of etcd, we have the possibility to archive idempotency for the
initialization of the cluster. The only problem is that we have to keep the random node password of the nodes
for rejoining. Considering the security, we use {{ node_password_salt + ansible_hostname | md5 }} as the
invariant node password for each node. After that, the nodes can be re-registered to the cluster when the cluster
is reinitialized by this playbook.
Checklist
[ ] Tested locally
[ ] Ran site.yml playbook
[ ] Ran reset.yml playbook
[ ] Did not add any unnecessary changes
[ ] Ran pre-commit install at least once before committing
Proposed Changes
When we use an external data source instead of etcd, we have the possibility to archive idempotency for the initialization of the cluster. The only problem is that we have to keep the random node password of the nodes for rejoining. Considering the security, we use {{ node_password_salt + ansible_hostname | md5 }} as the invariant node password for each node. After that, the nodes can be re-registered to the cluster when the cluster is reinitialized by this playbook.
Checklist
site.yml
playbookreset.yml
playbook