Getting Started with Single-Node Kubernetes: k3s / minikube
Spin up a working Kubernetes cluster on a single VPS with k3s, or try it locally with minikube.
Kubernetes has a reputation for being heavyweight, but getting a usable cluster running on a single machine is surprisingly quick. Full multi-node production setups are a different story—for learning, experiments, or a small service, one machine is plenty. This guide covers two paths: k3s on a server, and minikube on your laptop.
Check the resource requirements first
- k3s: the documented minimum is around 512MB of RAM and 1 CPU core. In practice, start with 1GB RAM, 1–2 vCPUs, and 5GB of disk for a smoother ride. It's a lightweight distribution built for exactly this.
- minikube: plan for 2 CPU cores, 2GB RAM, and 20GB of disk, plus a driver (Docker is the most common).
Too little memory leads to constant OOM kills, so leave your server some headroom.
Option 1: Install k3s on a VPS (the easy path)
On Ubuntu/Debian, a single command does it all:
curl -sfL https://get.k3s.io | sh -
The script installs k3s along with a bundled kubectl, and registers it as a systemd service that starts on boot. Once it finishes, check your node:
sudo kubectl get nodes
If you see a single node marked Ready, you're in business.
Where the kubeconfig lives
k3s writes its access credentials to /etc/rancher/k3s/k3s.yaml. To run kubectl without sudo, copy that file into your home directory:
mkdir -p ~/.kube
sudo cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
sudo chown $(id -u):$(id -g) ~/.kube/config
From then on, kubectl reads /.kube/config by default, or you can point at it explicitly with export KUBECONFIG=/.kube/config.
Option 2: Try it locally with minikube
With Docker installed on your own machine:
minikube start
kubectl get nodes
minikube sets up /.kube/config for you automatically. When you're done, minikube stop pauses it, and minikube delete wipes it entirely.
Run your first app
The commands below work on either path. Create an Nginx deployment and watch it come up:
kubectl create deployment web --image=nginx
kubectl get pods
Once the Pod reaches Running, expose it so you can reach it:
kubectl expose deployment web --port=80 --type=NodePort
kubectl get svc web
Clean up when you're finished:
kubectl delete deployment web
kubectl delete svc web
Summary
For learning Kubernetes on a single box, reach for k3s on a VPS (one curl command) or minikube on your laptop. Remember that your kubeconfig lives at /.kube/config, and kubectl get nodes is your first sanity check. Once a single kubectl create deployment works end to end, moving on to Services, Ingress, and multi-node clusters becomes a natural next step.