Skip to main content
📬 Get weekly Production AI insights Practical notes on Kubernetes, AI infrastructure and platform engineering. No spam. Subscribe free
Install K3s on Ubuntu: Lightweight Kubernetes
Platform Engineering

Install K3s on Ubuntu: Lightweight Kubernetes

How to install K3s on Ubuntu in 2026. Complete step-by-step guide with commands, verification, and post-install configuration.

LB
Luca Berton
· 1 min read

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 nodes

Add Worker Nodes

On the server, get the token:

sudo cat /var/lib/rancher/k3s/server/node-token

On 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
#K3s #Installation #Ubuntu #Tutorial #DevOps
Share:

Want to operate this yourself, in production?

Take the free AI Platform Engineer Readiness Scorecard to see which skills transfer — then build a production-shaped AI platform in the 4-week Bootcamp.

Take the Scorecard →
Luca Berton — The Production AI Expert, Docker Captain

Luca Berton

The Production AI Expert · Docker Captain · KubeCon Speaker

15+ years in enterprise infrastructure. Author of 8 technical books, creator of Ansible Pilot (1M+ YouTube views, 648K site users). Former Red Hat engineer. Speaker at KubeCon EU 2026 and Red Hat Summit 2026.

Free 30-min Production AI consultation

Book Now