I've spent the last few months running real workloads on Kubernetes, coming from a background of Docker Compose and "it works on my machine." This is the mental model I wish someone had given me on day one.
The Inversion
With a VM or a container, you ask a machine to run something:
you โ machine โ process
Kubernetes inverts it. You declare what you want, and the platform reconciles reality toward your declaration:
you โ desired state (YAML) โ control loop โ actual state
Every command, every field, every "why is it doing this" is answered by one question: what state did I declare, and what is the controller doing to converge toward it? When something is wrong, the answer is almost always a gap between declared and actual state โ and kubectl describe shows the gap.
[!NOTE]
- Kubernetes does not schedule your pods. It schedules nothing. You describe pods; the scheduler places them; controllers keep them alive. The platform's job is convergence, not execution. Once that clicks, 70% of the docs make sense.
The Five Objects That Matter
| Object | What it really is |
|---|
| Pod | A group of containers sharing network/IPC. The unit of scheduling, not of your app |
| Deployment | "Keep N pods of this version alive, roll out changes gradually" |
| Service | A stable network endpoint in front of shifting pods |
| Ingress | HTTP routing from the outside into your services |
| ConfigMap/Secret | Configuration that isn't baked into the image |
Everything else (StatefulSet, DaemonSet, Job, HPAโฆ) is a specialization of these five.
My Daily Five kubectl Commands
kubectl get pods -o wide
kubectl get pods -w
kubectl describe pod <name>
kubectl logs -f <pod>
kubectl exec -it <pod> -- sh
That's the daily loop. kubectl get events --sort-by=.lastTimestamp is the sixth when things go sideways.
The Configmap That Taught Me Everything
Our API needed a database URL. The "right" way:
apiVersion: v1
kind: ConfigMap
metadata:
name: api-config
data:
DATABASE_URL: "postgres://db:5432/app"
---
apiVersion: apps/v1
kind: Deployment
spec:
template:
spec:
containers:
- name: api
envFrom:
- configMapRef:
name: api-config
Then I made a typo in the key name. The pod started fine. The app crashed at runtime with "DATABASE_URL missing." No warning at deploy time, no red status anywhere obvious.
[!WARNING]
- Kubernetes will happily run a pod that is technically healthy and functionally dead. Your liveness/readiness probes are the bridge between "container is running" and "service is serving." Ship probes, or you're shipping a mystery.
What I'd Actually Recommend
For most full-stack apps, in order of "stop it being a nightmare":
- Docker Compose on a managed VM โ fine up to real scale. You understand every line.
- A managed PaaS (Render, Railway, Fly.io) โ you get containers, routing, secrets without owning k8s.
- Managed Kubernetes (EKS/GKE/AKS) โ when you genuinely need the scheduling, the autoscaling, the multi-service mesh.
- Self-hosted k8s โ only if operating it is itself your product.
Kubernetes is not the goal. It's the consequence of needing more than one environment, more than one service, or more than one region. If you're a two-person full-stack team and the app is a web service plus a database, Compose is not "beginner" โ it's correct.
The Vocabulary Cheat Sheet
CrashLoopBackOff โ container exits, k8s restarts it, it exits again. Read logs.
ImagePullBackOff โ image name/tag/registry auth is wrong.
Pending โ no node can accept it (resources? taints?). describe.
NotReady โ readiness probe failing. Pod exists, service is not.
OOMKilled โ memory limit too low (or a real leak). Both are possible.
The system will not hold your hand. But it will tell you exactly what state it thinks you wanted โ if you know to look.
Discussion (0)
Sign in or create an account to join the discussion.
No comments yet. Start the discussion.