Very Nice Tutorial, I was able to setup Kubernetes on 3 of my raspberry pis using your tutorial.

When performing “sudo apt-get update -q”, there was a timeout connecting to “apt.kubernetes.io”. In order to resolve this I used:

echo "deb https://packages.cloud.google.com/apt/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list

instead of:

echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list

Then to install kubeadm, I had to change my raspian mirror(https://raspberrypi.stackexchange.com/questions/27479/cannot-connect-to-mirrordirector-raspbian-org)and perform the following:

sudo apt-get install kubelet=1.11.3-00 kubectl=1.11.3-00 kubeadm=1.11.3-00 kubernetes-cni=0.6.0-00sudo dphys-swapfile swapoff && sudo dphys-swapfile uninstall && sudo update-rc.d dphys-swapfile removesudo systemctl daemon-reload
sudo systemctl restart kubelet
sudo kubeadm init --kubernetes-version=v1.11.3 --apiserver-advertise-address=192.168.1.100 --ignore-preflight-errors=ALL

Otherwise it will pickup the newest version (1.12.0 at this time) which may not work with raspbian.

Also some steps from https://gist.github.com/alexellis/fdbc90de7691a1b9edb545c17da2d975?WT.mc_id=-blog-scottha such as running:

sudo sed -i 's/failureThreshold: 8/failureThreshold: 20/g' /etc/kubernetes/manifests/kube-apiserver.yaml

My ISP doesn’t allow me to access “cloud.weave.works”. It took me a bit, but I found out I put my router address incorrectly in “/etc/dhcpcd.conf”. Note I also added 8.8.8.8 to “domain_name_servers” along with my router address

pi@k8s-master:~ $ kubectl get pods -n kube-systemNAME                                 READY     STATUS    RESTARTS   AGEcoredns-78fcdf6894-5c84l             1/1       Running   0          3hcoredns-78fcdf6894-bwr92             1/1       Running   0          3hetcd-k8s-master                      1/1       Running   5          3hkube-apiserver-k8s-master            1/1       Running   5          2hkube-controller-manager-k8s-master   1/1       Running   5          2hkube-proxy-4rq8g                     1/1       Running   1          2hkube-proxy-4rt96                     1/1       Running   3          3hkube-proxy-cjp22                     1/1       Running   1          2hkube-scheduler-k8s-master            1/1       Running   5          3hweave-net-484tc                      2/2       Running   0          42mweave-net-pb5l5                      2/2       Running   0          42mweave-net-xfmlt                      2/2       Running   0          42mpi@k8s-master:~ $ kubectl get nodesNAME            STATUS    ROLES     AGE       VERSIONk8s-master      Ready     master    3h        v1.11.3k8s-worker-01   Ready     <none>    2h        v1.11.3k8s-worker-02   Ready     <none>    2h        v1.11.3

Thanks for making this tutorial!!

Technical Marketing @ GitLab 🦊, Developer at home, Keeping ATX Weird 😜

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store