Kubernetes Pod Model — aka “How is a pod the smallest unit of work?”

SRC Innovations
SRC Innovations
Published in
3 min readSep 13, 2023

Kubernetes is no longer the new kid on the block. Everybody has heard of it, the companies that know how good it is are using it, the companies that don’t know how good it is, are wondering if they should find out.

Devs, infrastructure people, even testers have all been playing with it and have gotten a rough idea of how it all works. Here at SRC Consulting, we’ve provided consulting services that includes Kubernetes, and also use it for our SaaS product catalog search engine: Srchy.

From those experiences, we know one thing that does regularly come up is a hastily scribbled drawing of how various Kube resources map to a pod. Therefore, we figured, instead of drawing this on a board over and over for various people… Let’s just get it diagrammed properly so we can reuse it all the time!

For your reference purposes… Here it is in all of its glory!

How to use this Pod Context Diagram

This poster is split up into various sections that help convey the native resources’ intent, and how they apply to pods.

Namely, there’s the group (in light blue) that actually generate pods:

  • Deployments
  • Replica Sets
  • Daemon Sets
  • Jobs (and Cronjobs that generate Jobs)
  • Stateful Set

The group on the right that helps route traffic to pods:

  • Services that load balance traffic across selected pods
  • the Ingress that routes external (mostly) traffic to the services

The embedded resources (in orange) that pods use directly:

  • the Config Map & Secrets that feed read only data into the pod’s containers
  • the Persistent Volume Claim (backed with a Persistent Volume) that is normally used for read and write purposes

Resources that manage the number of replicas (in green) on a pod:

  • The Horizontal Pod Autoscaler that automatically increases the number of replicas
  • The Pod Disruption Budget that ensures a minimum number of pods exists

Finally, the new(ish) kid on the block, the Vertical Pod Autoscaler — on the left — that manages how much compute & memory the containers within the pod use.

So now when you’re trying to convey how a ConfigMap affects the configuration of a pod, you can pull out this poster and point at things.

Want the full sized diagram?

If you’d like it as a fully scalable image that you can use as a reference, you can get it here too!

Download Kubernetes v1.28 Pod Context Diagram

We hope you find it useful! Please let us know what you think, and if there are others that you’d like to see, feel free to tell us!

References

Kubernetes API — Latest version: https://kubernetes.io/docs/reference/kubernetes-api/

Originally published at https://blog.srcinnovations.com.au on September 13, 2023.

--

--

SRC Innovations
SRC Innovations
0 Followers
Editor for

IT Consultancy based in Melbourne.