Raspberry Pi Kubernetes Cluster - Part 3
Well, it took me long enough to follow up on my previous posts. There are reasons.
- The day job has been fun and busy
- Family life has been fun and busy
- I kept hitting annoying errors when trying to get my cluster up and running
The first two reasons are the usual reasons a person doesn’t blog. :)
The last one is what prevented me from blogging sooner. I had mutliple issues when trying to use rak8s to setup my cluster. I’m a big fan of Ansible and I do not like running scripts over and over. I did read K8S on Raspbian Lite from top to bottom and realized automation would make this much better.
The issues I experienced
apt-get update would not work
I started with the vanilla Raspbian lite image to run on my nodes and had MANY MANY issues with running
apt-get update and
apt-get upgrade. The mirrors would disconnect often and just stall. This doesn’t help my attempted usage of rak8s which does both on the
cluster.yml run (which I’ll talk about later).
rak8s changes needed to run HypriotOS and kubernetes 1.13.1
Clone the repo locally and I’ll walk you through what I changed to get rak8s working for me and HypriotOS.
Change the following files:
- change user from
- change user from
- I have an open PR for this here
After you make those changes you can run
ansible-playbook cluster.yml as the rak8s documentation suggests. Please note this is after you edit
inventory and copy
ssh keys to raspberry pis.
Flannel networking issue once nodes are up
After I get all of the nodes up I noticed the master node was marked ast
NotReady and when I ran
kubectl describe node raks8000 I saw the following error:
KubeletNotReady runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized
kubectl -n kube-system apply -f https://raw.githubusercontent.com/coreos/flannel/bc79dd1505b0c8681ece4de4c0d86c5cd2643275/Documentation/kube-flannel.yml
After readin the issue it seems the fix will be in the next version of flannel and will be backported to v0.10.0.