Raspberry Pi ➕ Docker ➕ minikube 🟰 your home Kubernetes cluster ⚗️
Why do you need a local Kubernetes cluster?
Firstly, why Kubernetes?
- Because it is a popular and widely used container orchestration platform in the industry.
- To gain hands-on experience with this technology.
Why locally? Why not use PaaS from cloud providers?
- With a local Kubernetes cluster, you have complete control over the setup and peek under the hood to better understand of how this technology works.
- A local Kubernetes cluster allows you to experiment with different configurations and settings without incurring cloud costs.
- Finally, having a local Kubernetes cluster for learning and experimentation can be a valuable asset for your career growth.
Now, when we had it settled, let us get to the business.
Selected technologies
Selected technologies for this project are:
| Area | Selection | Version |
|---|---|---|
| Hardware | Raspberry Pi | 4 Model B with 8GB RAM |
| OS | Ubuntu Server for ARM | 22.04.2 LTS (64-bit) |
| Kubernetes platform | minikube | 1.29.0 |
| minikube driver | Docker | 23.0.2 |
Step one → prepare Raspberry Pi
Install Ubuntu Server on Raspberry Pi. Instructions can be found in official Ubuntu documentation. Please remember to enable SSH and set user and password during installation.
Connect to the Ubuntu server.
1
ssh [username]@[host]
Step two → install Docker using the convenience script
Execute below command to download the convenience script.
1
curl -L https://get.docker.com -o get-docker.sh
Execute downloaded script.
1
sudo sh get-docker.sh
Run below command to add your current user to the docker group.
1
sudo usermod -aG docker $USER
Then create a new shell execution environment with a new effective group identification.
1
newgrp docker
Finally, execute below command to verify 🩺 your new Docker installation.
1
docker run hello-world
Step three → install minikube
Use below command to download minikube.
1
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-arm64
Install downloaded minikube.
1
sudo install minikube-linux-arm64 /usr/local/bin/minikube
Start 🚀 installed minikube.
1
minikube start --driver docker
Create an alias for convenience.
1
alias kubectl="minikube kubectl --"
Finally, time to verify 🩺 your local Kubernetes installation.
1
kubectl cluster-info
Congrats 🎉, your own Kubernetes cluster is all set up and ready to play with!