Kubernetes

Pods & Workloads

The smallest deployable unit and how it runs.

35 min read intermediate 3 objectives

Status

Not started

What you will learn

  • Define a pod
  • Understand pod lifecycle
  • Use init and sidecar containers

New to this? Start here

The basics, in plain English

In Kubernetes you do not run a container directly; you run a Pod. A Pod is the smallest unit, a wrapper around one (or a few tightly-linked) containers that share an address and storage.

Pod
The smallest thing Kubernetes runs: a wrapper around one or more containers.
Workload
The general word for an app running in the cluster.
Manifest
A YAML file describing what you want Kubernetes to create.
kubectl
The command-line tool you use to talk to a Kubernetes cluster.
apply
The command that tells Kubernetes “make the cluster match this file”.
01

Pods

A pod is one or more containers sharing network and storage. You rarely create pods directly; controllers manage them.

Try it yourself

yaml
apiVersion: v1
Which Kubernetes API version this object uses.
kind: Pod
The type of object being created.
metadata: { name: web }
Name the pod “web”.
spec:
The desired state of the pod.
containers:
The list of containers in this pod.
- name: web
One container, also named web.
image: nginx:1.27
Run the nginx 1.27 image.
↳ lines explain what each command does — only the commands get copied

Finished this topic?

Mark it done to earn 100 XP and keep your streak alive.