DEV Community

Cover image for Inception of a pod - behind the scenes
Ashok Nagaraj
Ashok Nagaraj

Posted on • Edited on

1 1

Inception of a pod - behind the scenes

A pod is the atomic unit of scheduling and is a run-time entity. It is transient in nature and can have multiple containers within.
If a pod fails, Kubernetes can automatically create a new replica of that pod to continue operations.
The pod cannot alter/heal it's state directly and an external controller (schedulter, proxy ..) is needed to repair


States

Image description

Pending State

The pod has been accepted by the API server. The pod remains in the pending state until the containers are started.

Running State

The pod has been scheduled to a node and all the containers in the pod have been created and are running.

Succeeded State

The pod has performed the task. All the container(s) exited or terminated with status 0 and after that marked as Succeeded.

Failed State

Pod reaches this state when all the containers have exited or terminated but one or more container(s) have returned back with a non-zero status.

Unknown State

Occrus when kubelet is unable to get the state of the pod due to multiple reasons, like if there is a crash or if livenessProbe keeps failing or pod has come-up after readinessProbe has timed-out.


State transitions

Image description

Source: https://livebook.manning.com/book/kubernetes-in-action-second-edition/chapter-6/v-12/5

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay