Pod
A pod is the smallest deployable unit in Kubernetes, representing a single instance of a running process in the cluster.
📦
Pod
• Shared network
• Shared storage
• Scheduled together
• Shared storage
• Scheduled together
Mental Model
A pod is like a "wrapper" that can hold one or more containers that need to work together. Think of it as a shared workspace - all containers in a pod share the same network and storage resources.
YAML Example
apiVersion: v1
kind: Pod
metadata:
name: web-pod
spec:
containers:
- name: web
image: nginx
- name: logger
image: log-collector
volumeMounts:
- mountPath: /var/log
name: shared-logs
volumes:
- name: shared-logs
emptyDir: {}Common Misconceptions
- ✗Pods are containers - FALSE: Pods contain containers
- ✗Pods are persistent - FALSE: Pods are ephemeral
- ✗Every container needs its own pod - FALSE: Related containers can share a pod
Key Takeaways
- • A pod is the smallest deployable unit in Kubernetes, representing a single instance of a running process in the cluster.
- • A pod is like a "wrapper" that can hold one or more containers that need to work together. Think of ...
- • Check the YAML example for implementation details
- • Be aware of the common misconceptions listed above