Full Kubernetes Without Enterprise Resource Overhead
Standard upstream Kubernetes (k8s) control planes require multiple gigabytes of memory, complex etcd quorum clustering, and substantial compute overhead, making it impractical for low-cost cloud nodes.
**K3s** (developed by Rancher / CNCF) strips legacy alpha APIs, in-tree storage drivers, and third-party cloud controllers, packaging the entire Kubernetes API server, scheduler, and containerd into a single binary that consumes **less than 512MB of RAM**.
Step 1: Install K3s in a Single Command
On an Ubuntu 24.04 Linux VPS:
# Install K3s with Traefik Ingress Controller and Local Storage
curl -sfL https://get.k3s.io | sh -s - --write-kubeconfig-mode 644
Verify that the single-node control plane is ready:
kubectl get nodes -o wide
Output:
NAME STATUS ROLES AGE VERSION
edutechz-01 Ready control-plane,master 25s v1.30.2+k3s1
Step 2: Deploying a Scalable Microservice
Create a deployment manifest `web-deployment.yaml`:
apiVersion: apps/v1
kind: Deployment
metadata:
name: cloud-api
labels:
app: cloud-api
spec:
replicas: 3
selector:
matchLabels:
app: cloud-api
template:
metadata:
labels:
app: cloud-api
spec:
containers:
- name: nginx
image: nginx:alpine
resources:
limits:
memory: "128Mi"
cpu: "250m"
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: cloud-api-service
spec:
selector:
app: cloud-api
ports:
- port: 80
targetPort: 80
Apply the workload:
kubectl apply -f web-deployment.yaml
kubectl get pods
Step 3: Ingress Routing via Traefik
K3s ships with Traefik pre-installed. Route public domain traffic to your cluster pods via an Ingress resource:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: cloud-api-ingress
annotations:
ingress.class: traefik
spec:
rules:
- host: k8s.yourdomain.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: cloud-api-service
port:
number: 80
kubectl apply -f ingress.yaml
You now have a production-grade, self-healing, multi-replica Kubernetes environment running smoothly on a budget-friendly VPS!