This sets up a one node Kubernetes cluster on a RaspberryPI. This is based on the Hypriot Docker image for RPi.
Why ? Because it is the easiest way to start experimenting with containers on ARM architectures which can be extremely useful for the IoT and Embedded business. It can also be a great platform to investigate scalability issues of both Docker and Kubernetes.
You will need a RaspberryPi and you will need to have installed the Hypriot OS image on it
Clone this repository on your Pi
$ git clone git@github.com:Project31/kubernetes-installer-rpi.git
$ cd ./kubernetes-installer-rpi
Install a master build-master.sh
script
$ ./build-master.sh
On a different RPi install a node build-node.sh
script
We use the Kubernetes kubelet
running as a systemd unit to monitor a few Docker containers that make up the Kubernetes cluster.
The Kubelet binary for ARM is downloaded and installed in /usr/bin/kubelet
, a manifest is copied to /etc/kubernetes/manifests/kubernetes.yaml
which represents a Kubernetes Pod that make up all the required containers.
In this pod we have:
etcd
container. Which we run by building an etcd image from scratch on the PI.gcr.io/google_containers/pause:0.8.0
locally after having compiled the pause Golang code for ARM.Finally, we download the Kubernetes client kubectl
for ARM from the official release:
$ curl -fsSL -o kubectl https://storage.googleapis.com/kubernetes-release/release/v1.0.3/bin/linux/arm/kubectl
The ARM binaries for the kubelet
and hyperkube
are downloaded from https://github.com/Project31/kubernetes-arm