What is a Pod in Kubernetes?

A pod is a group of one or more containers. A container is an enclosed, self-contained execution process, much like a process in an operating system. Kubernetes uses pods to run your code and images in the cluster.

Kubernetes works with Pods, rather than containers, so that containers in the same pod can be guaranteed to run on the same machine. Containers in the same pod share their networking infrastructure, storage resources, and lifecycle.

Animated diagram of Kubernetes pod

Why are Pods useful in Kubernetes?

Pods are useful because containers in the same pod share their lifecycle and storage resources. This lets you communicate between containers via the file system or over the network. It allows for multi-container pod design patterns like the Sidecar, Adapter, and Ambassador patterns.

These patterns let you separate your systemโ€™s concerns so that you can keep your application code free from log collecting, metrics, and external proxy services.