This entry assumes you have already available some Talos linux instances (be it VMs, or bare metal). It follows the documented steps (v.17 at the moment of writing).
Prerequisites
You need to have the IPs of the Talos linux instances, so you can build the cluster(s). Select one node as a main node. In my case, I've selected the node with IP = 10.0.0.179
as my main node. I'll refer to this IP address as MAIN_CLUSTER_IP
.
Initial configuration
talosctl gen config vmcluster https://(MAIN_CLUSTER_IP):6443 --force
Apply it for the first node:
talosctl apply-config --insecure -n (MAIN_CLUSTER_IP) --file controlplane.yaml
After, add the node to the cluster:
talosctl bootstrap --nodes (MAIN_CLUSTER_IP) --endpoints (MAIN_CLUSTER_IP) --talosconfig=./talosconfig
Subsequent nodes
For all other nodes, you only need to apply-config
with either controlplane.yml
or worker.yml
, like so for example:
talosctl apply-config --insecure -n 10.0.0.184 --file worker.yaml
Note: Talos docs note that you should have 3 control plane nodes and the rest as workers.
When finished
Once they are ready, you can export the kubectl configuration:
talosctl kubeconfig alternative-kubeconfig -n 10.0.0.179 -e 10.0.0.179
and, to make our life easier, we do the following:
mkdir ${HOME}/.kube-talos
cp alternative-kubeconfig ${HOME}/.kube-talos
export KUBECONFIG=${HOME}/.kube-talos/alternative-kubeconfig
HTH,
Member discussion: