k3tcd - Deploy and manage Highly Available K3s clusters
k3tcd is a tool to easily deploy and manage true HA K3s clusters atop a distributed etcd datastore. It takes a number of parameters but in its most basic form it can be used like this:
k3tcd deploy -n 10.10.0.1,10.10.0.2,10.10.0.3
Provided there's password-less SSH access to those IPs, the above command will:
- Create separate certificates authorities for etcd peer and client connections
- Create and sign all required peer and client certificates and keys
- Download the latest stable release of k3s and etcd to the local host
- Upload certificates, systemd service files, and binaries to remote nodes
- Start the cluster and enable systemd services
- Start a local load-balancer with the remote nodes as backends
- Create a local config file to access the cluster via
kubectl
The tool is opinionated in that it'll only support etcd as datastore for the clusters, even though K3s itself supports others, and deploys a minimal K3s with only coredns
enabled. This might be configurable at some point.
Requirements
64bit Linux, Windows, or macOS on the local host and 64bit systemd-based Linux on the remote nodes.
TODO
Supporting multiple clusters and scaling existing clusters. More configuration options.