Hands-on guide series
k3s: Kubernetes on One VM
A seven-part, hands-on guide to running Kubernetes on a single VPS with k3s: install and your first pod, Deployments and self-healing, Services and networking, Ingress, ConfigMaps and Secrets, persistent storage with limits and probes, and day-two operations with backup and upgrades. Every command tested on a live Ubuntu 24.04 server.
What you will build
Security is layers, not a switch. Each part closes a different category of attack, from the automated sweep that finds a brand-new server, to the day one gets in anyway. Read them in order, or jump to what you need.
- 1
Install k3s and Your First PodInstall k3s on one Ubuntu 24.04 slice, bring the node Ready in under a minute, run your first pod, and read exactly what k3s bundles for you.8 min - 2
Pods, Deployments and Self-HealingWrite a Kubernetes Deployment on k3s, scale it to three pods, delete one, and watch the ReplicaSet recreate it while the rollout stays green.6 min - 3
Services and NetworkingGive your pods a stable address with a Kubernetes Service on k3s: a ClusterIP and a NodePort, real endpoints, and service discovery by name.6 min - 4
Ingress: Route a Hostname to a ServiceRoute a hostname to a Service with a Kubernetes Ingress on k3s using Traefik, then curl the app through the ingress and read a real 200 back.7 min - 5
Config and SecretsFeed a pod its settings with a ConfigMap and Kubernetes Secrets on k3s, mount both, and watch the app read them with the secret kept masked.6 min - 6
Persistent Storage, Limits and ProbesAdd persistent storage to k3s with a local-path PVC that outlives a pod, set resource limits, and let liveness and readiness probes guard a pod.7 min - 7
Operations, Upgrades and BackupRun k3s day two: read metrics with kubectl top, plan a version upgrade, take a k3s backup of the datastore and restore it, then uninstall cleanly.6 min