Skip to content

Container vs Pod

Containers are isolated processes, while pods are groups of containers that share resources and are scheduled together.

Single Container Pod
Multi-Container Pod

Mental Model

If containers are individual workers, a pod is a work team. Team members share tools (network, storage) and work in the same location (node). You can have a team of one (single-container pod) or many (multi-container pod).

YAML Example

# Single container pod
apiVersion: v1
kind: Pod
spec:
  containers:
  - name: app
    image: myapp

# Multi-container pod
apiVersion: v1
kind: Pod
spec:
  containers:
  - name: app
    image: myapp
  - name: sidecar
    image: sidecar-proxy

Common Misconceptions

  • ✗Pod and container are the same thing - FALSE: Pods wrap containers
  • ✗Each container gets its own IP - FALSE: Pod IP is shared
  • ✗Containers in a pod are scheduled separately - FALSE: They're scheduled together

Key Takeaways

  • • Containers are isolated processes, while pods are groups of containers that share resources and are scheduled together.
  • • If containers are individual workers, a pod is a work team. Team members share tools (network, stora...
  • • Check the YAML example for implementation details
  • • Be aware of the common misconceptions listed above
Kubernetes Cosmos•An interactive learning experience
Built by GLM 4.7