KevsRobots Learning Platform
25% Percent Complete
By Kevin McAleer, 2 Minutes
Page last updated May 24, 2025

In this lesson, youβll install K3s on your Raspberry Pi master node, set up the cluster, and prepare for adding worker nodes.
K3s makes Kubernetes installation fast and easy β especially on resource-limited devices like Raspberry Pi.
From your main computer, SSH into the Pi that will act as the control plane (master):
Replace
piandpi-master.localwith your username and hostname or IP if needed.
Run this one-liner:
curl -sfL https://get.k3s.io | sh -
K3s will:
k3s.serviceAfter installation:
sudo k3s kubectl get nodes
You should see your master node listed as Ready.
To make kubectl easier to use, copy the K3s kubeconfig to your userβs home directory:
mkdir -p ~/.kube
sudo cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
sudo chown $(id -u):$(id -g) ~/.kube/config
Now you can run:
kubectl get nodes
Youβll need a token to join worker nodes to the cluster:
sudo cat /var/lib/rancher/k3s/server/node-token
Copy the token β youβll use it on the worker nodes in the next lesson.
| Problem | Solution |
|---|---|
k3s.service fails to start |
Check logs: journalctl -u k3s -e |
kubectl not found |
Use sudo k3s kubectl or set up kubeconfig |
| Token file missing | Confirm youβre on the master node |
| Network errors | Check for cgroup settings and firewalls |
π Your Kubernetes control plane is now running!
Next up: Adding Nodes
You can use the arrows β β on your keyboard to navigate between lessons.
Comments