On new nodes, run this command:
wget -q https://raw.githubusercontent.com/TwistedHardware/k8s/main/setup.sh; chmod +x setup.sh; ./setup.sh; rm setup.sh
NOTE: If you are creating a new cluster, There will be a token on the screen at the end of the setup. Save the generated token somewhere safe.
To configure a kubectl
on a remote PC to access the cluster, ssh into a control plane node and run this command:
sudo cat /etc/kubernetes/admin.conf
copy the output and save it on the remote PC in ~/.kube/config
To add new control plane nodes:
To add a worker nodes:
To remove a node from the cluster:
To see the dashboard, run this command (make sure you configured kubectl
on your PC):
kubectl proxy
Then open the link:
If you don't have the token, ssh into a control plane node and run this command:
echo $(kubectl -n kubernetes-dashboard get secret $(kubectl -n kubernetes-dashboard get sa/admin-user -o jsonpath="{.secrets[0].name}") -o go-template="{{.data.token | base64decode}}")