Skip to main content

Pod

Updated 3 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/kubernetes-pod

In short

A pod is the smallest deployable unit in Kubernetes: one or more containers that share a network address and storage and are scheduled together on one node.

What is a pod in Kubernetes?

In Kubernetes, you don't run containers directly; you run pods. A pod wraps one or more containers that always run together on the same machine, called a node, and share the same network identity and storage volumes. Most pods contain a single application container, and Kubernetes creates, moves, and deletes pods as its basic unit of scheduling.

All containers in a pod share one IP address and port space, so they can talk to each other on localhost, and they can mount the same volumes to share files. This makes pods a good fit for the sidecar pattern, where a helper container, such as a log shipper or a service mesh proxy, runs next to the main app. Pods are designed to be disposable: if a pod crashes or its node fails, it is not repaired but replaced by a new pod with a new name and IP address, which is why traffic is sent through a Service, a stable address that routes to whichever pods are currently healthy.

In practice you rarely create pods by hand. You define a Deployment, StatefulSet, or Job, and that controller creates and maintains the right number of pods from a template, replacing any that fail and rolling out new versions gradually. A pod is like a shared apartment for containers: the roommates share one address and one kitchen, and when the lease ends, everyone moves out together.

A pod is often confused with a container. A container is a single packaged process with its own image, while a pod is the Kubernetes wrapper around one or more containers that adds shared networking, storage, and a lifecycle. A pod is also not a node: a node is the virtual or physical machine, and one node typically runs many pods.

Key takeaways

  • A pod is the smallest unit that Kubernetes schedules and manages.
  • Containers in the same pod share an IP address, localhost, and volumes.
  • Most pods run one container; helper containers in the same pod are called sidecars.
  • Pods are disposable and are replaced, not repaired, when they fail.
  • Controllers such as Deployments create and manage pods; Services give them a stable address.

Example

A pod with an app container and a sidecaryaml
apiVersion: v1
kind: Pod
metadata:
  name: web
  labels:
    app: web
spec:
  containers:
    - name: app              # the main application container
      image: registry.example.com/web:1.4.2
      ports:
        - containerPort: 8080
    - name: log-shipper      # sidecar: same IP address and localhost as the app
      image: registry.example.com/log-shipper:2.0

Readers ask

What is the difference between a pod and a container?

A container is one isolated process packaged from an image. A pod is a Kubernetes object that holds one or more containers, gives them a shared IP address and storage, and is scheduled onto a node as a single unit.

Why does a pod's IP address change?

Pods are disposable, so when one is replaced, the new pod gets a new IP address. Applications should reach pods through a Kubernetes Service, which keeps a stable name and address and forwards traffic to the current healthy pods.

Should I put multiple containers in one pod?

Only when they are tightly coupled and must run together on the same node, such as an app and its logging or proxy sidecar. Separate services, like a web app and its database, belong in separate pods so they can be scaled and updated independently.

See also

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings