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

Before installing K3s, itβs important to ensure that all nodes can communicate consistently over the network.
In this lesson, youβll configure static IP addresses, hostnames, and optionally set up a local DNS or hosts file for easier management.
K3s (and Kubernetes) rely heavily on:
Without stable networking, your cluster will be unreliable or fail to form properly.
| Hostname | MAC Address | Static IP |
|---|---|---|
| pi-master | b8:27:eb:xx:xx:xx |
192.168.1.100 |
| pi-node1 | b8:27:eb:xx:xx:xx |
192.168.1.101 |
| pi-node2 | b8:27:eb:xx:xx:xx |
192.168.1.102 |
π§ This is the easiest and most router-friendly method.
If your router doesnβt support reservations, configure static IPs directly:
Edit netplan config (Ubuntu):
sudo nano /etc/netplan/00-installer-config.yaml
Example:
network:
ethernets:
eth0:
dhcp4: no
addresses: [192.168.1.100/24]
gateway4: 192.168.1.1
nameservers:
addresses: [1.1.1.1, 8.8.8.8]
version: 2
Apply changes:
sudo netplan apply
Each Pi should have a unique, meaningful hostname:
sudo hostnamectl set-hostname pi-master
Also update /etc/hosts:
127.0.0.1 localhost
127.0.1.1 pi-master
Repeat on all nodes (e.g., pi-node1, pi-node2).
On each Pi, ping the others:
ping pi-node1.local
ping 192.168.1.101
If .local doesnβt work, use IPs or set up a shared /etc/hosts file on all nodes:
192.168.1.100 pi-master
192.168.1.101 pi-node1
192.168.1.102 pi-node2
If youβre managing a home lab or multiple clusters, consider setting up Pi-hole or dnsmasq to provide:
pi-master.localdomain)Youβre ready to move forward when:
Next up: Installing K3s
You can use the arrows β β on your keyboard to navigate between lessons.
Comments