Pods: The Smallest Unit

Harry · 11 Sep 2026 · 8 views

What is a Pod?

A pod is the smallest thing you can schedule in Kubernetes. It wraps one or more containers that share the same IP address, network namespace and optional shared volumes. In practice most pods run a single container.

Running a Pod

You can run a pod directly, but it is usually better to create it through a controller. For learning, a bare pod works:

kubectl run nginx --image=nginx:stable-alpine
kubectl get pods
kubectl describe pod nginx

Lifecycle States

  • Pending - accepted but not yet running (scheduled, image being pulled).
  • Running - bound to a node, containers started.
  • Succeeded - all containers finished successfully.
  • Failed - a container exited with an error.
  • CrashLoopBackOff - keeps starting and crashing; investigate logs.

Looking Inside

kubectl logs nginx
kubectl exec -it nginx -- /bin/sh
kubectl port-forward nginx 8080:80

port-forward maps a local port to the pod so you can test it in the browser at http://localhost:8080.

Deleting a Pod

kubectl delete pod nginx

Remember: if the pod was created by a Deployment, Kubernetes will immediately recreate it. Bare pods do not come back.

Key Points

  • One pod = one IP; containers inside a pod share that IP.
  • Use Deployment (not bare pods) for real workloads.
  • kubectl logs and describe are your debugging basics.
Share this post:

Comments (0)

Please login or register to comment.