Setting up a k3s cluster on Proxmox requires three VMs, an external load balancer, and a shared NFS mount for persistent storage. This article describes the exact steps for a production-ready setup.
Why use k3s on Proxmox?
K3s runs perfectly well on lightweight VMs. On Proxmox, I allocate 2 vCPUs and 2GB of RAM to each node — more than enough for a home lab cluster. The big advantage over full K8s is the installation: just one command per node.
Node setup
Three Ubuntu 24.04 VMs: k3s-1 as the control plane, k3s-2 and k3s-3 as workers.
# Control plane
curl -sfL https://get.k3s.io | sh -s - server \
--disable traefik \
--tls-san k3s.siekman.io
# Retrieve token
cat /var/lib/rancher/k3s/server/node-token
# Workers (replace TOKEN and SERVER_IP)
curl -sfL https://get.k3s.io | K3S_URL=https://SERVER_IP:6443 \
K3S_TOKEN=TOKEN sh -
External Nginx reverse proxy
I’m deliberately disabling Traefik — I’m using an existing Nginx instance outside the cluster as the ingress point.
upstream k3s_nodes {
server 192.168.1.11:80;
server 192.168.1.12:80;
server 192.168.1.13:80;
}
server {
listen 443 ssl;
server_name *.siekman.io;
location / {
proxy_pass http://k3s_nodes;
}
}
NFS for persistent storage
# On the NFS server
apt install nfs-kernel-server
echo "/mnt/k3s-data 192.168.1.0/24(rw,sync,no_subtree_check)" >> /etc/exports
exportfs -ra
This provides you with a stable foundation for stateful workloads such as MariaDB and Gitea.
What is k3s?
K3s is a lightweight Kubernetes distribution from Rancher, designed for edge and resource-constrained environments. The binary is less than 100MB and uses SQLite as its default datastore.
What is the minimum amount of RAM required for a k3s node?
A k3s agent node requires at least 512MB of RAM, but 1GB is recommended for production.
Lees het origineel in het Nederlands
← Lees in het Nederlands