K3s is a lightweight Kubernetes distribution created by Rancher Labs, and it is highly available and production-ready. It has a small binary size and low resource requirements. In simple words, K3s is a lightweight, simplified version of Kubernetes that's easier to install and run on smaller computers. This tutorial on PerLod Hosting will cover how to install K3s on Ubuntu 24.04 in a single-node environment. Carefully follow the instructions, and at last, you have a K3s single-node complete setup.
To try out this guide, you’ll need a Ubuntu server. If you don’t already have one, you can get a reliable VPS Hosting Service or Dedicated Server from PerLod. Our plans are optimized for Kubernetes and K3s deployments, which gives you the perfect environment to follow along with this tutorial.
Why Use K3s? Use Case Examples
When you need the power of containers and Kubernetes but without complex and high resource requirements, K3s is a great choice. It is simple, light, and fast.
It can deploy and manage apps on low-power devices like Raspberry Pis in factories, retail stores, etc. K3s offers developers easily install Kubernetes on their local machines. Also, it can be useful for home labs and learning. Furthermore, K3s serves as a modern container platform for embedded systems in field appliances and is perfectly suited for CI/CD pipelines.
K3s vs Kubernetes (footprint, dependencies):
| Aspect |
Kubernetes (K8s) |
K3s |
| Footprint |
Heavy. Requires significant CPU, RAM, and storage. |
Extremely light. Single binary, ~50MB. Minimal resource usage. |
| Dependencies |
Complex. Often requires multiple services and add-ons to be configured. |
Simple. Bundles everything into the binary. |
Once your are understand the concept of K3s, proceed to the following steps to start a K3s single-node setup on Ubuntu 24.04.
Prerequisites
To set up K3s, you need the following requirements:
- An Ubuntu 24.04 with sudo access
- Public IP Address
- Open Ports 80 and 443 through the firewall
- A domain name points to your Public IP address
Note: By default, K3s installs Traefik as the Ingress Controller. With Traefik, K3s will start routing external terrific with ease.
At this point, prepare the Ubuntu 24.04 server for installing K3s.
Disabling Swap for K3s
First, you must disable swap on your server. To do this, run the following commands:
sudo swapoff -asudo sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab
Verify you have disabled swap by running:
Activate K3s Required Kernel Modules
Next, you must enable the necessary kernel modules for installing K3s. To do this, run the following commands:
printf "overlay\nbr_netfilter\n" | sudo tee /etc/modules-load.d/k8s.conf >/dev/nullsudo modprobe overlaysudo modprobe br_netfilter
Set K3s Kernel Network Parameters
Finally, you must set up the network parameters. To do this, run the command below:
cat <<EOF | sudo tee /etc/sysctl.d/k8s.confnet.bridge.bridge-nf-call-iptables = 1net.bridge.bridge-nf-call-ip6tables = 1net.ipv4.ip_forward = 1EOF
Once you are done, apply system configuration settings by running:
Install K3s on Ubuntu 24.04
At this point, you can start your K3s installation. Use the official installation script to install K3s on your server:
curl -sfL https://get.k3s.io | sh -
During the installation, the K3s service will be activated. Verify K3s service status with the command below:
sudo systemctl status k3s --no-pager -l

Also, check for the default nodes and pods with the following commands:
kubectl get nodes -o wide

In your output, you must see a Ready node and the coredns, traefik, metrics-server, and local-path-provisioner pods running.
Now we will show you an example of deploying an Nginx test project with K3s.
Deploy Nginx with K3s - Test Project
First, create a deployment named "nginx" and tell it to run a pod using the nginx:alpine container image:
kubectl create deployment nginx --image=nginx:alpine
Then, create a network service that displays the Nginx deployment to the outside world on a specific port, so you can access it from your browser:
kubectl expose deployment nginx --port=80 --type=NodePort
Finally, verify the details of the new "nginx" service, specifically the port number you need to use to access the website:
You can test your Nginx deployment by using the curl command and the port number you got from the above command:
curl http://server-ip-address:NodePort
If you see the Welcome to nginx page, the deployment is healthy.

Publish Nginx on port 80 with Traefik Ingress
It is recommended to use K3s' built-in Ingress Traefik to make your service accessible with your domain name on port 80/443.
First, create a file named nginx-ingress.yaml:
sudo nano nginx-ingress.yaml
Then, add the following content to the file with your domain name. This config is a map that connects a public website address to the internal service.
1apiVersion: networking.k8s.io/v12kind: Ingress3metadata:4 name: nginx-ingress5 namespace: default6spec:7 ingressClassName: traefik8 rules:9 - host: perlod.lab.net10 http:11 paths:12 - path: /13 pathType: Prefix14 backend:15 service:16 name: nginx17 port:18 number: 80
Then, run the following command to create the Ingress rule (the traffic map) defined in the nginx-ingress.yaml file:
kubectl apply -f nginx-ingress.yaml
At this point, you can test your Ingress rule so you can access the Nginx website from your browser. Use the command below:
curl http://perlod.lab.net/
You should see the default Nginx welcome page. This proves that Traefik (on port 80) successfully received your request for Perlod.lab and routed it to the correct Nginx service.
Multiple domains on one service:
If you want to connect multiple domains to the same service, you can add multiple rules with different hosts within the same Ingress. For example:
1spec:2 ingressClassName: traefik3 rules:4 - host: perlod.lab1.net5 http:6 paths:7 - path: /8 pathType: Prefix9 backend:10 service:11 name: nginx12 port:13 number: 8014 - host: perlod.lab2.net15 http:16 paths:17 - path: /18 pathType: Prefix19 backend:20 service:21 name: nginx22 port:23 number: 80
This Ingress configuration acts as a virtual host traffic router.
Quick Troubleshooting Common K3s Errors
If service is not accessible on port 80/443, you must:
- Check your DNS record points to the correct server IP.
- Check your firewall (UFW) to ensure ports 80 and 443 are open.
- Check Traefik's status with the following commands:
kubectl get pods -n kube-system -o wide | grep traefikkubectl get svc -n kube-system traefik
If the Ingress rule is not working, you must:
- Ensure ingressClassName: traefik is correctly set in your Ingress YAML.
- Verify that the service name and port number in the backend section are correct.
- Check for errors using these commands:
kubectl describe ingress nginx-ingresskubectl describe svc nginxkubectl get events -A --sort-by=.lastTimestamp | tail -n 50
Uninstalling K3s
You can clean up the resources you have created. To do this, you can run the commands below:
kubectl delete ingress nginx-ingresskubectl delete svc nginxkubectl delete deploy nginx
Then, use the following command to completely remove the K3s software and all of its components from your server:
sudo /usr/local/bin/k3s-uninstall.sh
Conclusion
In this step, you have successfully prepared your system (disabled swap, configured kernel parameters with sysctl, loaded modules), installed K3s and verified its service was running, deployed Nginx as a sample application, and it is using a Traefik Ingress on port 80.
You can now use this same structure for your real applications. You must create an internal Service and use an Ingress to publish it to the internet with different domain names.
We hope this guide (install K3s on Ubuntu 24.04) is useful for you. If you need any help, feel free and ask. Subscribe to us on X and Facebook for the latest Kubernetes updates and guides.
Further Reading:
Dedicated Servers Resurgence 2025 - why dedicated servers are becoming popular again.
Terraform and Ansible Dedicated Server Automation – step-by-step guide to automating server deployment and configuration.