The smallest deployable unit in Kubernetes. Understanding Pods is foundational — everything in K8s (Deployments, ReplicaSets, DaemonSets) ultimately manages Pods.Source: CKA Day 25
Identification data (name, namespace, labels, annotations)
spec
Desired state specification
spec.containers
Containers to run in the Pod
spec.containers[].name
Container name
spec.containers[].image
Docker image
spec.containers[].ports
Exposed ports
spec.containers[].resources
CPU/memory requests and limits for scheduling and runtime guardrails
spec.serviceAccountName
The ServiceAccount identity this Pod uses for API server authentication (defaults to default)
spec.volumes
Volumes available to all containers in the Pod (emptyDir, hostPath, PVC, ConfigMap, Secret)
spec.containers[].volumeMounts
Mounts a named volume into a container filesystem path
Resource Requests and Limits
Each container can declare resource requests and limits. Requests tell the scheduler how much CPU/memory to reserve when placing the Pod on a node. Limits cap runtime consumption; if a container exceeds its memory limit, it is killed with OOMKilled rather than exhausting the whole node. This is why resource settings belong under spec.containers[], not at the Pod root. Source: CKA Day 16
Pod Lifecycle
Phase
Description
Pending
Accepted by cluster, containers not yet running
Running
Bound to node, at least one container running
Succeeded
All containers terminated successfully
Failed
All containers terminated, at least one failed
Unknown
State cannot be determined
Pod IP Ephemerality
Every Pod receives a unique internal IP address. However, this IP is not stable — it changes on every restart, reschedule, or replacement.
# Original Pod IPkubectl describe pod nginx-deploy-abc123 | grep IP# IP: 10.244.1.2# Delete and recreate the Podkubectl delete pod nginx-deploy-abc123# New Pod gets a different IPkubectl describe pod nginx-deploy-def456 | grep IP# IP: 10.244.2.3
This is why Services are critical: they provide a stable virtual IP and DNS name that front a dynamic set of Pod backends. Front-end Pods should talk to back-end Pods via a Service (backend-svc:8080), never by hardcoding Pod IPs. Source: CKA Day 9
Validate before applying: kubectl apply --dry-run=client -f file.yaml
Explore fields: kubectl explain pod.spec
Production Note: You almost never deploy bare Pods in production. Pods are managed by higher-level controllers like Deployments and ReplicaSets, which provide self-healing, scaling, and rolling updates. Source: CKA Day 8
CKA Relevance
The CKA exam heavily tests both imperative speed and declarative reproducibility:
Create, debug, and modify Pods quickly under time pressure
Write YAML manifests from memory
Understand Pod networking and multi-container patterns
Know that Deployments manage ReplicaSets, which manage Pods
Practical Practice
Exam-style hands-on tasks for this topic. Complete each task before reviewing the solution. Time yourself — CKA tasks average 5–7 minutes.
Task 1: Create a Basic Nginx Pod
You are asked to create a Pod named nginx running image nginx:alpine and exposing port 80.
Requirements: Use an imperative command; verify the Pod is Running.
Verification:kubectl get pod nginxSolution:
kubectl run nginx --image=nginx:alpine --port=80
Task 2: Multi-Container Pod with Shared Volume
You are asked to create a Pod named web-log with two containers: an nginx container and a busybox sidecar. Both must share an emptyDir volume mounted at /var/log/nginx so the sidecar can read nginx logs.
Requirements: Use --dry-run=client -o yaml, edit the manifest to add the second container and volume, then apply.
Verification:kubectl get pod web-log and kubectl exec web-log -c sidecar -- ls /var/log/nginxSolution:
kubectl run web-log --image=nginx --dry-run=client -o yaml > web-log.yaml# Edit web-log.yaml to add the busybox sidecar and an emptyDir volume at /var/log/nginxkubectl apply -f web-log.yaml
Task 3: Fix a Broken Pod Image
A Pod named broken-app was created with image nginx:999 and is stuck in ImagePullBackOff. Fix it to use nginx:latest.
Requirements: Edit the live object directly; do not delete and recreate.
Verification:kubectl get pod broken-app shows Running.
Solution:
kubectl set image pod/broken-app broken-app=nginx:latest# or: kubectl edit pod broken-app
Task 4: Export, Edit, and Re-apply a Pod
You are asked to export the running Pod nginx to YAML, change its image to nginx:1.25, and re-apply the manifest.
Requirements: Use kubectl get with -o yaml, redirect to a file, edit the image field, then apply.
Verification:kubectl get pod nginx -o jsonpath='{.spec.containers[0].image}'Solution:
kubectl get pod nginx -o yaml > nginx-updated.yaml# Edit the image field to nginx:1.25kubectl apply -f nginx-updated.yaml --force
Related Pages
Multi-Container Pods — Deep dive into sidecar, init, adapter, and ambassador patterns
Init Containers — Setup and validation containers that run before the main app
Sidecar Pattern — Auxiliary containers for logging, monitoring, and proxying