This is an update to my original blog entry written more than a year ago.
Below is a quick recipe to add a node to your Kubernetes ARM cluster.on your Raspberry Pi.
Log into the worker node. And become root using:
Then open /boot/cmdline.txt and add the following to the end of the line:
cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1
Then turn off your swap executing the following command lines
dphys-swapfile swapoff dphys-swapfile uninstall update-rc.d dphys-swapfile remove apt purge -y dphys-swapfile
Reboot the worker node using:
After the reboot log back into your worker node and become root using:
The execute the following command lines
sudo apt-get update && sudo apt-get install -y apt-transport-https curl curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list sudo apt-get update sudo apt-get install -y kubelet kubeadm kubectl sudo apt-mark hold kubelet kubeadm kubectl
Then in a separate terminal log into the Kubernetes master and become root using:
Then list the available kubeadm tokens using:
kubeadm token list
If the list is NOT empty skip the following step, otherwise issue:
kubeadm token create
Back on the worker node it is time to join the Kubernetes cluster using:
kubeadm join —-token <token> <master_ip:6443> --discovery-token-unsafe-skip-ca-verification
token with the value of the output of the kubeadm command
shown in the terminal window that is logged into the Kubernetes master.
master_ip with the IP address of the Kubernetes master.
And voila your worker node is now joining the Kubernetes cluster.
Posted November 13th, 2019