Working with Pods & Containers

Gaurav Kaushik
2 min readMay 15, 2021
Pods deployed in a Kubernetes Worker node

In this part of our ongoing Kubernetes series, lets talk about Containers & Pods which are essentially the building block of the Kubernetes ecosystem.
In some texts, you may see Containers and Pods are been used interchangeably, but in K8s terminology there is a separate place for both of them.

A software container is a means of packing up an application or service and everything(dependencies, such as the code, runtime, system libraries etc) which is required for it to run, regardless of environment, in a single place.

But Kubernetes cannot create a container by itself. Kubernetes needs a container runtime for ex: docker, to be installed wherever it is running. With the help of a Container runtime, Kubernetes can efficiently manage containers using Pods.

A POD is the smallest unit of execution in Kubernetes. It is basically a wrapper for individual containers and this way the user can manage them through K8s. POD always has one or more containers running inside it.

Pods in the Kubernetes cluster can be used in two ways:

1) Pods that run a single container
2) Pods that run multiple containers that need to run together

By the end of this part, we will be able to understand:

  1. Managing Application configuration
  2. Managing Container Resources
  3. Monitoring Container Health with Probes
  4. Building self-healing Pods with Restart Policies
  5. Init containers

So, Lets start by having a bird-eye view on the working aspect of Pods and consequently containers w.r.t Kubernetes in the next posts.

--

--