Why Pods? Why Not Just Containers?

ujjwal bansal
1 min readFeb 20, 2023

--

When learning Kubernetes, you may have wondered why there is an extra layer on top of containers, namely Pods.

In the image below, there are four containers grouped into three sets (which are called Pods). In the initial stages of our Kubernetes learning journey, we typically consider Pods with a single container. However, in some cases, there may be multiple containers that are dependent on each other. In the image, Container 1, Container 2, Container 3, and Container 4 are components of a single application, but Container 3 and 4 need to run co-located and shouldn’t be isolated from each other. This is why we put them inside a single Pod.

WHY PODS?

  1. Pods provide a way to group one or more containers together and manage them as a single entity
  2. All containers within a Pod share the same network namespace and can communicate directly with each other, making it easier to set up networking between the containers.
  3. In addition, Pods can have shared storage volumes that all the containers within the Pod can use.

CONCLUSION

Pods in Kubernetes provide a way to manage a group of containers that need to work together and provide additional features to keep them running in a production environment.

--

--

ujjwal bansal
ujjwal bansal

Written by ujjwal bansal

Propagating a life-changing perspective to everyone is my motive. Writing my own expirences or learnings to empower others.