k3s is a lightweight, certified Kubernetes distribution from Rancher that is perfect for edge computing, IoT, CI/CD, and small deployments. It installs in seconds and requires only 512 MB RAM. This guide installs k3s on Ubuntu 24.04 LTS.

Tested and valid on:

  • Ubuntu 24.04 LTS

Prerequisites

  • Ubuntu 24.04 LTS server
  • A user with sudo privileges
  • Minimum 1 vCPU and 512 MB RAM

Step 1 – Install k3s (Single-Node Server)

Run the k3s installation script:

curl -sfL https://get.k3s.io | sh -

This installs k3s and starts it as a systemd service automatically.

Step 2 – Verify k3s is Running

Check the service status:

sudo systemctl status k3s

Step 3 – Configure kubectl Access

k3s creates a kubeconfig file at /etc/rancher/k3s/k3s.yaml:

mkdir -p ~/.kube
sudo cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
sudo chown $USER ~/.kube/config

Step 4 – Verify the Cluster

List nodes and pods:

kubectl get nodes
kubectl get pods --all-namespaces

Step 5 – Deploy a Test Application

Deploy nginx:

kubectl create deployment nginx --image=nginx
kubectl expose deployment nginx --port=80 --type=NodePort
kubectl get service nginx

Step 6 – Add Worker Nodes (optional)

Get the node token from the server:

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

On each worker node, run:

curl -sfL https://get.k3s.io | K3S_URL=https://server_ip:6443 K3S_TOKEN= sh -

Step 7 – Uninstall k3s

To remove k3s from the server:

sudo /usr/local/bin/k3s-uninstall.sh

Conclusion

k3s is now running on Ubuntu 24.04 LTS. It provides a full Kubernetes-compatible API in a tiny footprint — ideal for development environments, edge nodes, and resource-constrained servers.