Adding a node to a Kubernetes ARM cluster

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.

Install Docker

Log into the worker node. And become root using:

  sudo su

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:

  sudo su

The execute the following command lines

apt-get update && sudo apt-get install -y apt-transport-https curl
curl -s | apt-key add -
echo "deb kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list
apt-get update
apt-get install -y kubelet kubeadm kubectl

Then in a separate terminal log into the Kubernetes master and become root using:

  sudo su

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

Replace token with the value of the output of the kubeadm command shown in the terminal window that is logged into the Kubernetes master. And replace 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