Below are the steps to install 5 nodes + 1 master of k8s on Raspberry Pi
SD card preparation
Prepare 6 SD cards and flash with the Hypriot OS, this would be the most stable OS as of today.
Install the tool flash
Flashing 6 SD card with the latest Hyprio OS - hostname from node[01-06]
Default username and password would be pirate:hypriot, make sure to change it before proceed.
Install kubeadm on master and other nodes
Use root privilege to install kubeadm on all 6 raspberry pi
For the Master node
Deploy the master with the below network, better don’t change the network mask, since other plugins (flannel) are also using the same one for somea reason I don’t know. Better don’t take the extra risk for nothing :)
After installation, it should prompt for something like this below (for k8s version 1.9.2)
For the rest of 5 slave nodes
After master node deployted, it should prompt for something like below for connectng to the master node.
Last step - to deploy the flannel network driver
Instead of following the tutorial from Hypriot for v0.7.1 or v0.8, we install the latest one from the community.
In which, we don’t have to install the rbac. (Not sure if RBAC is already included, but the below deployment works anyway).
Notice that the script is “apply” instead of “create”.
Finally, you should be able to get below:
Last and the least step - Upgrade to the latest version (v1.9.3)
Before we proceed, we upgrade kubeadm client first:
Store the kubeadm init’s flags:
Apply the upgrade
It failed and get the below error:
Alright, we fall back to v1.9.2…. :)
Deploy the Web UI
The default image is in amd64 format, which doesn’t work. Following error message will be thrown:
standard_init_linux.go:190: exec user process caused “exec format error”
Option 1:
Login with Token: Print the replicaset controller token with:
Option 2:
Totally skip it:
Deploy it with:
Some useful commands
In case it fucked up, you can reset everything with below:
Comments