← Back2-byte

Kubernetes Pods

Bit 0 of 70/8 complete
📖
Info

What is a Pod?

What is a Pod?

A Pod is the smallest deployable unit in Kubernetes. Think of it as a wrapper around one or more containers.

Key Concepts

  • A Pod can contain one or more containers
  • Containers in a Pod share the same network namespace (same IP address)
  • Containers in a Pod share the same storage volumes
  • Pods are ephemeral - they can be created, destroyed, and replaced

Why Pods?

Instead of running containers directly, Kubernetes uses Pods because:

  1. Co-location: Some containers need to run together
  2. Shared resources: Containers can share volumes and network
  3. Atomic unit: Kubernetes schedules Pods, not individual containers
┌─────────────────────────────────────┐
│              Pod                    │
│  ┌───────────┐   ┌───────────┐      │
│  │ Container │   │ Container │      │
│  │   (app)   │   │  (sidecar)│      │
│  └───────────┘   └───────────┘      │
│         │               │           │
│         └───────┬───────┘           │
│           Shared Network            │
│           Shared Volumes            │
└─────────────────────────────────────┘