Skip to content

Instantly share code, notes, and snippets.

Last active February 9, 2020 14:37
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
K8s version 1.12.1 can't be installed on a RPi - trying older versions of kubeadm and docker-engine

K8s on RPi

All credits go to @alexellis and his description.

I don't want to duplicate the blogpost but I am not able to get K8s running on my RPi 3 at all. So far I have tried to install those versions:

  • docker 18.06.1-ce
  • k8s 1.12.1

But this combination is not working at all for me. I have the exact same error.

For me this version is working. So right now I am only trying to find a working combination and want to share my experiences with the communnity. Maybe those scripts get obsolete with a new version of k8s. We will see...

# curl -sLSf $LINK | sudo sh
curl -sSL | sh && \
sudo usermod pi -aG docker
sudo dphys-swapfile swapoff && \
sudo dphys-swapfile uninstall && \
sudo update-rc.d dphys-swapfile remove
curl -s | sudo apt-key add - && \
echo "deb kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list && \
sudo apt-get update -q && \
sudo apt-get install -qy kubelet=$KUBERNETES_VERSION kubectl=$KUBERNETES_VERSION kubeadm=$KUBERNETES_VERSION
if [ ! -f /boot/cmdline_backup.txt ]; then
echo Adding " cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory" to /boot/cmdline.txt
sudo cp /boot/cmdline.txt /boot/cmdline_backup.txt
orig="$(head -n1 /boot/cmdline.txt) cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory"
echo $orig | sudo tee /boot/cmdline.txt
echo Please reboot
echo sudo kubeadm init --token-ttl=0 --apiserver-advertise-address=$PI_IP --pod-network-cidr= --ignore-preflight-errors=ALL
echo mkdir -p $HOME/.kube
echo sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
echo sudo chown $(id -u):$(id -g) $HOME/.kube/config
echo kubectl apply -f
# curl -sLSf $LINK | sudo sh
sudo kubeadm reset
sudo apt-get remove -qy kubelet kubectl kubeadm
rm -rf $HOME/.kube
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment