After a fresh install of Ubuntu server 20.04 on a Raspberry Pi (3b+ in this case) you may find that the default login (user: “ubuntu” password: “ubuntu”) won’t get you logged in.
After waiting for a few minutes while googling this the Rpi output some cloud-init and SSH-key messages. When trying again the default ubuntu/ubuntu login worked just fine.
So, it turns out that even though the login screen is shown and it looks like the OS has fully booted, it won’t be possible to log in until the cloud-init etc. have finished (which may take 5min or so)!
In a previous post we covered the deployment of a home k8s lab, but this post will show a much better way to do it as well as improving on the end result – a fully functional local cluster.
The installation is done using Vagrant with Flannel networking and MetalLB for load balancing.
Why go through the trouble of setting up a home lab for k8s? Well, while using public cloud services is a quick and easy way it will cost money to deploy and run. It will also rely upon predefined cloud formation templates which have already been created. Doing it locally can provide both a more economical way to use k8s as well as give more insight into the internal workings and how it’s actually set up.
Why not use Minikube? Because it’s overly simplified. Using a cluster deployment like this is not only a better learning and testing experience but it also provides an overall more realistic experience of a “real” k8s installation.
Configuration files
Download the Vagrant, Flannel and MetalLB files from GitHub or clone with Git
jonas@octo:~$ sudo apt-add-repository "deb http://apt.kubernetes.io/ kubernetes-xenial main"
Hit:1 http://jp.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 https://nvidia.github.io/libnvidia-container/ubuntu18.04/amd64 InRelease [1,106 B]
Get:3 https://nvidia.github.io/nvidia-container-runtime/ubuntu18.04/amd64 InRelease [1,103 B]
Hit:4 http://jp.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:5 https://download.docker.com/linux/ubuntu bionic InRelease
Get:6 https://nvidia.github.io/nvidia-docker/ubuntu18.04/amd64 InRelease [1,096 B]
Hit:7 http://jp.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:9 http://security.ubuntu.com/ubuntu bionic-security InRelease
Get:8 https://packages.cloud.google.com/apt kubernetes-xenial InRelease [8,993 B]
Err:8 https://packages.cloud.google.com/apt kubernetes-xenial InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6A030B21BA07F4FB
Hit:10 https://cf-cli-debian-repo.s3.amazonaws.com stable InRelease
Reading package lists… Done
W: GPG error: https://packages.cloud.google.com/apt kubernetes-xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6A030B21BA07F4FB
E: The repository 'http://apt.kubernetes.io kubernetes-xenial InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.