Kubernetes Pods

The atomic unit of scheduling in the VMware world is the virtual machine (VM), while in the Docker world it is the container. In the Kubernetes world, it is the Pod.

What is a Pod?

Kubernetes pods are the smallest deployable units of computing, making them easy to manage and create.

Pods contain one or more containers, such as Docker containers.

The simplest model is to run a single container per Pod.

When a Pod runs multiple containers, the containers are managed as a single entity and share the Pod’s resources. Generally, running multiple containers in a single Pod is an advanced use case.

Why does Kubernetes use pods?

Kubernetes uses pods to run containers because they provide an isolated environment with common resources and networking. This allows each container in a pod to share a consistent view of the system, making it easier to manage and scale applications.

Grouping containers in this way allows them to communicate with each other as if they were on the same physical hardware, while still remaining isolated to some degree.

Kubernetes’ well-known replication feature is based on organizing containers into pods. By organizing containers into pods, Kubernetes can use replication controllers to horizontally scale an application according to need.

In other words, if one pod is overloaded, Kubernetes can automatically create a copy and deploy it across the cluster.

Kubernetes pods not only support healthy functioning during periods of heavy load, but are also often replicated continuously to provide failure resistance to the system.

Pod lifecycle

Creating Pods

Storage in Pods

Pods Commands

Pods Commands Example