September 06, 2026 · by Alex M.
Container orchestration has become an essential skill for any modern system administrator. Kubernetes is the industry standard, but its classic installation can be overwhelming for a single VPS. This is where K3s steps in — a lightweight, CNCF-certified Kubernetes distribution, ideal for production environments with limited resources.
In this guide you will learn how to install and configure K3s on a NVMe VPS or SSD VPS, from scratch to your first working deployment.
K3s is developed by Rancher Labs and packages the entire Kubernetes stack into a single ~70 MB binary. It removes rarely-used components and replaces etcd with SQLite (by default) or PostgreSQL/MySQL for larger clusters.
Advantages of K3s over classic Kubernetes:
If you need a more robust production cluster, consider a managed dedicated server for guaranteed resources and included technical support.
Before you begin, make sure you have:
sudo privilegesConnect to your VPS and update packages:
sudo apt update && sudo apt upgrade -y
Install the necessary utilities:
sudo apt install -y curl wget git ufw
Enable UFW and configure basic rules:
sudo ufw allow ssh
sudo ufw allow 6443/tcp # K3s API server
sudo ufw allow 10250/tcp # Kubelet metrics
sudo ufw allow 80/tcp # HTTP
sudo ufw allow 443/tcp # HTTPS
sudo ufw enable
Note: If you plan to use multiple nodes in the cluster, also open port
8472/udpfor Flannel VXLAN.
K3s installation is done with a single curl command:
curl -sfL https://get.k3s.io | sh -
The official script downloads the binary, creates a systemd service, and starts K3s automatically. Check the status:
sudo systemctl status k3s
You should see active (running). Also verify the Kubernetes node:
sudo kubectl get nodes
Expected output:
NAME STATUS ROLES AGE VERSION
vps-demo Ready control-plane,master 2m v1.29.4+k3s1
By default, the kubeconfig file is located at /etc/rancher/k3s/k3s.yaml. Copy it to your home directory to run kubectl without sudo:
mkdir -p ~/.kube
sudo cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
sudo chown $(id -u):$(id -g) ~/.kube/config
export KUBECONFIG=~/.kube/config
Add the export to ~/.bashrc for persistence:
echo 'export KUBECONFIG=~/.kube/config' >> ~/.bashrc
source ~/.bashrc
Test it:
kubectl cluster-info
If you have two VPS instances (e.g., a NVMe VPS for the master and an SSD VPS for the worker), you can scale out the cluster.
On the master node, get the join token:
sudo cat /var/lib/rancher/k3s/server/node-token
On the worker node, run:
curl -sfL https://get.k3s.io | K3S_URL=https://<MASTER_IP>:6443 K3S_TOKEN=<TOKEN> sh -
Verify on the master that the new node has joined:
kubectl get nodes
Let's deploy a simple Nginx application to test the cluster.
kubectl create deployment nginx-demo --image=nginx:stable --replicas=2
kubectl expose deployment nginx-demo --port=80 --type=NodePort
kubectl get pods
kubectl get services
Example output:
NAME READY STATUS RESTARTS AGE
nginx-demo-7d6f8b9c5-4xkpz 1/1 Running 0 30s
nginx-demo-7d6f8b9c5-9qlmn 1/1 Running 0 30s
Find the assigned NodePort (e.g., 32456) and open http://<VPS_IP>:32456 in your browser.
Helm greatly simplifies deploying complex applications (cert-manager, Ingress controllers, etc.):
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
Verify:
helm version
Add the official stable repo:
helm repo add stable https://charts.helm.sh/stable
helm repo update
K3s ships with Traefik pre-installed as the default Ingress Controller. Verify:
kubectl get pods -n kube-system | grep traefik
To expose a web application with a custom domain, create a file ingress-demo.yaml:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: nginx-ingress
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: web
spec:
rules:
- host: demo.yourdomain.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: nginx-demo
port:
number: 80
Apply it:
kubectl apply -f ingress-demo.yaml
For automatic TLS with Let's Encrypt, install cert-manager via Helm:
helm repo add jetstack https://charts.jetstack.io
helm repo update
helm install cert-manager jetstack/cert-manager \
--namespace cert-manager \
--create-namespace \
--set installCRDs=true
This setup pairs perfectly with a valid SSL certificate for your domain.
Install the Kubernetes Dashboard:
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml
Create a ServiceAccount for access:
kubectl create serviceaccount dashboard-admin -n kubernetes-dashboard
kubectl create clusterrolebinding dashboard-admin \
--clusterrole=cluster-admin \
--serviceaccount=kubernetes-dashboard:dashboard-admin
Get the access token:
kubectl -n kubernetes-dashboard create token dashboard-admin
# Status of all pods
kubectl get pods --all-namespaces
# Resource usage (requires metrics-server)
kubectl top nodes
kubectl top pods
# Pod logs
kubectl logs <pod-name>
# Detailed description
kubectl describe pod <pod-name>
K3s includes Local Path Provisioner by default — perfect for persistent volumes on a single node.
Create a PersistentVolumeClaim:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: demo-pvc
spec:
accessModes:
- ReadWriteOnce
storageClassName: local-path
resources:
requests:
storage: 5Gi
kubectl apply -f pvc-demo.yaml
kubectl get pvc
The security of a Kubernetes cluster is just as important as the security of the server it runs on. Key measures:
curl -sfL https://get.k3s.io | sh - handles updates automaticallyIf you need help securing your infrastructure, CLIQHOST's server management services can take that responsibility off your hands.
K3s can be updated by re-running the install script:
curl -sfL https://get.k3s.io | sh -
To fully uninstall K3s from the server node:
/usr/local/bin/k3s-uninstall.sh
For worker nodes:
/usr/local/bin/k3s-agent-uninstall.sh
K3s makes Kubernetes accessible even on modest infrastructure. By following the steps in this guide, you have installed a working cluster, deployed your first application, configured Ingress with Traefik, and laid the foundation for a secure and scalable production setup.
For a performant and stable K3s cluster, we recommend NVMe VPS hosting from CLIQHOST — with ultra-fast storage, guaranteed uptime, and 24/7 technical support. As your project grows, you can always scale up to a dedicated server or take advantage of our server management services.
Explore more guides and tutorials on the CLIQHOST blog.
👉 Have questions or want to find the right configuration for your project? Contact the CLIQHOST team — we're here to help.
Real reviews from customers who trust CLIQHOST for performance, reliability and expert technical support.
"We moved our online shop from a foreign host and the difference is night and day — pages load instantly and support replies in minutes, in Romanian."
"Migrated 12 client sites to CLIQHOST. Free migration, zero downtime, and the cPanel setup is exactly what my team needed. Highly recommend."
"Our NVMe VPS handles traffic spikes without a sweat. Full root, local datacenter, and billing in MDL — everything we wanted from a provider."