A Kubernetes Pod is the smallest deployable unit in Kubernetes. It groups one or more tightly coupled containers that share networking, storage, and lifecycle.
Prerequisites
- A Kubernetes cluster or local learning cluster
- The kubectl client configured for the target cluster
Create a single-container Pod
Use a declarative manifest so the desired state can be reviewed before it is applied.
apiVersion: v1
kind: Pod
metadata:
name: nginx-pod
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.27
ports:
- containerPort: 80- Save the manifest as pod-nginx.yaml.
- Review it before applying it to a non-production namespace.
- Apply it with kubectl apply -f pod-nginx.yaml.
kubectl apply -f pod-nginx.yaml
kubectl get pod nginx-pod
kubectl describe pod nginx-podVerify lifecycle and logs
Check the Pod phase, events, and container logs. A Pod is replaceable, so important state should live in an appropriate persistent service.
| State | What to check |
|---|---|
| Pending | Scheduling, resources, and image pull events |
| Running | Readiness, logs, and application health |
| Failed | Exit status, events, and previous logs |
When the experiment is complete, remove the learning resource and confirm that no important data was stored only inside the Pod.
Troubleshooting
For ImagePullBackOff, inspect the image name and pull events. For CrashLoopBackOff, inspect current and previous logs and verify the container command.
Conclusion
Pods provide a shared execution boundary for tightly coupled containers. Use labels, explicit resources, health checks, and higher-level controllers as the workload grows.
Continue the sequence with Kubernetes Architecture Explained, then return to this Pod model before practicing kubectl Commands Explained.
Join the discussion
1 CommentsAsk questions, add context, or share what worked.
More from Melochip Editorial
Learn what Playwright testing is, why modern QA teams use it, how testers can get started, and the major types...
7 min read · Sep 19, 2026
Learn how Kubernetes Deployments and ReplicaSets work with practical YAML, scaling, self-healing, rolling upda...
7 min read · Sep 17, 2026
Learn Kubernetes security best practices with RBAC, Secrets, ServiceAccounts, Pod securityContext, NetworkPoli...
6 min read · Sep 17, 2026Related articles
Learn how Kubernetes Deployments and ReplicaSets work with practical YAML, scaling, self-healing, rolling upda...
7 min read · Sep 17, 2026
Learn Kubernetes monitoring and logs with kubectl logs, events, metrics-server, top commands, Prometheus, Graf...
5 min read · Sep 17, 2026
Learn Kubernetes Ingress with controllers, IngressClass, host and path routing, TLS, DNS, annotations, redirec...
8 min read · Sep 17, 2026
Learn Kubernetes ConfigMaps and Secrets with YAML, environment variables, file mounts, update behavior, immuta...
8 min read · Sep 17, 2026Stay in the loop. Get new Melochip articles
Receive Melochip article updates when new articles are available. Explicit opt-in only.
nice info