
Kubernetes from Scratch: The Core Concepts
June 29, 2026 · 11 min read
The biggest barrier to learning Kubernetes is the density of terminology. But all of it answers a single question: 'How do we reliably run and scale a container application?' Let's view the concepts around that question.
Pod: the smallest unit
Kubernetes doesn't run containers directly; it wraps them in Pods. A Pod holds one or more containers that share networking and storage. Most of the time, one Pod = one app container.
Deployment: manages Pods
A Pod alone is fragile — if the node dies, the Pod is gone. A Deployment is where you say 'always run 3 copies of this app.' If a Pod dies, the Deployment creates a new one; when updating versions it does a rolling update.
apiVersion: apps/v1
kind: Deployment
metadata:
name: web
spec:
replicas: 3
selector:
matchLabels: { app: web }
template:
metadata:
labels: { app: web }
spec:
containers:
- name: web
image: nginx:1.27Service: a stable address
Pods come and go and their IPs keep changing. A Service puts a stable name/IP in front of a group of Pods and load-balances traffic among them. So you talk to the 'web' service and don't care that the Pods behind it change.
Putting it together
- You put your container in a Pod.
- With a Deployment you specify how many copies and how they update.
- With a Service you give it a stable access point.
- With Ingress you route external HTTP traffic inward.
Your first Deployment hit CrashLoopBackOff — fix it
You deployed your first app but the Pod keeps restarting. This is the #1 place beginners get stuck. The diagnosis flow:
- 1kubectl get pods → look at STATUS and RESTARTS
- 2kubectl logs <pod> → why does the app die? (and the previous attempt: --previous)
- 3kubectl describe pod <pod> → Events + probe failures
- 4Fix the root cause (config, image, port), verify the rollout
$ kubectl get podsNAME READY STATUS RESTARTS AGEweb-6d9f-abc 0/1 CrashLoopBackOff 4 2m$ kubectl logs web-6d9f-abc --previousError: connect ECONNREFUSED postgres:5432 # the app can't reach the DB$ kubectl describe pod web-6d9f-abc | grep -A2 LivenessLiveness: http-get :3000/health delay=0s timeout=1s # /health hits the DB → keeps failing# Fix: correct the DB env + raise the liveness delay, then:$ kubectl rollout status deploy/webdeployment "web" successfully rolled out # ✓
Tip
CrashLoopBackOff = container starts then dies (check logs). ImagePullBackOff = image can't be pulled (describe → wrong name/tag/registry auth). Two different worlds; don't conflate them.
Mini task
Apply a Deployment with a non-existent tag (nginx:nope) instead of nginx:1.27 → observe ImagePullBackOff. Then run an image that crashes on a bad command → observe CrashLoopBackOff. Distinguish both with logs/describe and fix them.
Hands-on task — try it in your browser
These four concepts (Pod, Deployment, Service, Ingress) make up 80% of Kubernetes. You learn the rest far faster by trying it on a cluster — which is exactly what you do in Cloudpuz labs.
Official sources
Last verified: 2026-07-17
Frequently Asked Questions
What is a Pod in Kubernetes?
A Pod is the smallest unit in Kubernetes. Kubernetes doesn't run containers directly; it wraps them in Pods. A Pod holds one or more containers that share networking and storage, and most of the time one Pod equals one app container.
What is the difference between a Deployment and a Pod?
A Pod alone is fragile; if the node dies, the Pod is gone. A Deployment is where you say 'always run this many copies of the app': if a Pod dies it creates a new one, and it performs a rolling update when updating versions.
What does a Service do in Kubernetes?
Pods come and go and their IPs keep changing. A Service puts a stable name/IP in front of a group of Pods and load-balances traffic among them, so you talk to the service and don't care that the Pods behind it change.
How do you fix a CrashLoopBackOff error?
CrashLoopBackOff means the container starts and then dies; to diagnose, use 'kubectl logs <pod>' (and --previous to see the prior attempt) to find why the app dies, then 'kubectl describe pod' to inspect Events and probe failures. Fix the root cause (config, image, port) and verify the rollout.
What is the difference between CrashLoopBackOff and ImagePullBackOff?
CrashLoopBackOff is when the container starts then dies, diagnosed by checking logs. ImagePullBackOff means the image can't be pulled, caused by a wrong name/tag or registry auth, and diagnosed with describe. They are two different worlds and shouldn't be conflated.
Reading isn't enough — do it.
Practice these topics in an interactive terminal in your browser.