CRITICAL INFRA
Loading critical CVEs…
ALL EXPLOITED
Loading…

HowTo: easy Kubernetes with k3s on Debian

📅 2026-09-18 · Cyber Immunity

k3s is full Kubernetes, but lightweight (a single binary, <512MB RAM) — ideal for SMB and edge. A cluster from scratch: server, workers, an app and ingress. Step by step.

1. Server node

# nod server (control-plane) — instalare intr-o comanda
curl -sfL https://get.k3s.io | sh -
# verifica
sudo k3s kubectl get nodes
# tokenul pt workeri:
sudo cat /var/lib/rancher/k3s/server/node-token

2. Add workers

# pe fiecare worker (agent) — pointezi la server + token
curl -sfL https://get.k3s.io | \
  K3S_URL=https://SERVER_IP:6443 K3S_TOKEN=<TOKEN> sh -
# pe server: verifica ca s-au alaturat
sudo k3s kubectl get nodes -o wide

3. Local kubectl

# kubectl local (copiaza kubeconfig de pe server)
mkdir -p ~/.kube
sudo cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
sed -i 's/127.0.0.1/SERVER_IP/' ~/.kube/config
kubectl get nodes

4. Deploy an app

# deploy o aplicatie + service
kubectl create deployment web --image=nginx --replicas=3
kubectl expose deployment web --port=80 --type=ClusterIP
kubectl get pods,svc

5. Ingress (Traefik)

# k3s vine cu Traefik ingress inclus — expui aplicatia pe un host
kubectl apply -f - <<'EOF'
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata: { name: web }
spec:
  rules:
  - host: web.example.com
    http:
      paths:
      - path: /
        pathType: Prefix
        backend: { service: { name: web, port: { number: 80 } } }
EOF

6. Verify

kubectl get nodes
kubectl get pods -A
kubectl get ingress
curl -H 'Host: web.example.com' http://SERVER_IP/

Conclusion

You now have a working Kubernetes cluster, easy to operate, ready for apps. We size, secure and add storage/monitoring on request.

Let's discuss your project →