Forem

Cover image for What are Kubernetes pods ?
Adi Polak
Adi Polak

Posted on

6 4

What are Kubernetes pods ?

A Pod is a group of one or more containers, such as Docker.
It is important to understand that although Kubernetes is defined as a container orchestrator. It doesn't run containers directly.
Instead, it wraps one or more containers into a higher-level structure AKA pod.

The group shares storage and network, and a specification for how to run the containers. A Pod’s contents are always co-located, co-scheduled and run in a shared context.

Containers within a Pod share an IP address and port space.
They can find each other via localhost. They can also communicate with each other using standard inter-process communications(IPC) like POSIX shared memory.

Containers in different Pods have distinct IP addresses and can not communicate by IPC without special configuration. Hence, they will use Pod IP addresses instead.

Applications within a Pod also have access to shared volumes, which defined as part of a Pod and are made available to be mounted into each application’s filesystem.

In terms of Docker, a Pod is modeled as a group of Docker containers with shared namespaces and shared filesystem volumes.

Pods are not durable and have a lifecycle:

  1. Pods are created
  2. Pods assigned a unique ID (UID)
  3. Pods are scheduled to nodes ( until restart of deletion )

Phase status is part of the lifecycle:

FYI

  • If a Node dies, after a timeout period, the Pods scheduled to that node are scheduled for deletion.
  • Pod with UID can be replaced by an identical Pod, with the same name if desired, but with a new UID.

... that's a wrap!

That was Kubernetes pods in under 3 min! which is part of Kubernetes Bitesize series.

Resources:
Kubernetes.io
Step by step tutorial

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay