Skip to content

Instantly share code, notes, and snippets.

Embed
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:

  • 2018-10-09-raspbian-stretch-lite.zip
  • 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...

#!/bin/sh
# curl -sLSf $LINK | sudo sh
KUBERNETES_VERSION=1.9.11-00
PI_IP=192.168.0.14
curl -sSL get.docker.com | sh && \
sudo usermod pi -aG docker
sudo dphys-swapfile swapoff && \
sudo dphys-swapfile uninstall && \
sudo update-rc.d dphys-swapfile remove
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - && \
echo "deb http://apt.kubernetes.io/ 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
fi
echo Please reboot
echo sudo kubeadm init --token-ttl=0 --apiserver-advertise-address=$PI_IP --pod-network-cidr=10.244.0.0/16 --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 https://git.io/weave-kube-1.6
#!/bin/sh
# 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
You can’t perform that action at this time.