Now I move on to installing Kubernetes.

On Node 1

curl -sfL https://get.k3s.io | sh -s - --write-kubeconfig-mode 644 --disable servicelb --token <1Password> --node-ip 10.0.20.160 --disable-cloud-controller --disable local-storage

On Nodes 2 –4

curl -sfL https://get.k3s.io | K3S_URL=https://10.0.20.160:6443 K3S_TOKEN=<1Password> sh -

Installing apps that would have been installed had I replaced dietpi.txt per the instructions.

  • OpenSSH Client
  • Samba Client
  • RPi.GPIO
  • OpenSSH Server
  • Python 3 pip

Label nodes

kubectl label nodes cube01 kubernetes.io/role=worker
kubectl label nodes cube02 kubernetes.io/role=worker
kubectl label nodes cube03 kubernetes.io/role=worker
kubectl label nodes cube04 kubernetes.io/role=worker

Denote the node-type as “worker” for deploying applications

kubectl label nodes cube01 node-type=worker
kubectl label nodes cube02 node-type=worker
kubectl label nodes cube03 node-type=worker
kubectl label nodes cube04 node-type=worker

And we now have a four node Kubernetes cluster!

kubectl command in terminal

Up next, install Helm and Arkade.