Here is how to install K3s on Ubuntu in 2026. Tested and verified.
Prerequisites
- Ubuntu 22.04 or 24.04 LTS
- 2 GB RAM minimum (4 GB recommended)
- 2 CPU cores minimum
Install K3s Server (Control Plane)
curl -sfL https://get.k3s.io | sh -That is it. One command. K3s is now running.
Verify
sudo k3s kubectl get nodes
sudo k3s kubectl get pods -A
# Copy kubeconfig for regular kubectl use
mkdir -p ~/.kube
sudo cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
sudo chown $(id -u):$(id -g) ~/.kube/config
export KUBECONFIG=~/.kube/config
kubectl get nodesAdd Worker Nodes
On the server, get the token:
sudo cat /var/lib/rancher/k3s/server/node-tokenOn each worker node:
curl -sfL https://get.k3s.io | K3S_URL=https://SERVER_IP:6443 K3S_TOKEN=YOUR_TOKEN sh -Install with Custom Options
# Without Traefik (use your own ingress)
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--disable traefik" sh -
# Without ServiceLB
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--disable servicelb --disable traefik" sh -
# With specific version
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION="v1.31.0+k3s1" sh -Uninstall
# Server
/usr/local/bin/k3s-uninstall.sh
# Agent
/usr/local/bin/k3s-agent-uninstall.sh