DevOpsLesson
DevOpsLesson

Free, comprehensive DevOps tutorials and learning roadmaps. Master Docker, Kubernetes, CI/CD, and more.

Stay Updated

Get notified about new tutorials and features.

Tutorials

  • What is DevOps?
  • Docker Tutorial
  • Terraform Tutorial
  • CI/CD Pipeline
  • All Tutorials

Roadmaps

  • DevOps Engineer
  • Cloud Engineer
  • SRE Path
  • All Roadmaps

Company

  • About Us
  • Blog
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 DevOpsLesson. All rights reserved.

DOCKERKUBERNETESTERRAFORMAWSCI/CDLINUXGITDEVOPS ROADMAPCLOUD ROADMAPSRE ROADMAPGIT CHEATSHEETDOCKER CHEATSHEETK8S CHEATSHEETTF CHEATSHEETLINUX CHEATSHEETDOCKERFILE LINTERYAML VALIDATORCRON PARSERREGEX TESTER

Kubernetes Tutorial

Introduction to Kubernetes
Kubernetes Architecture
Installing Kubernetes
kubectl Basics
Kubernetes Pods
Kubernetes Deployments
Kubernetes Services
ConfigMaps and Secrets
Kubernetes Storage
Kubernetes Namespaces
Kubernetes Resource Management
Helm for Kubernetes
Kubernetes Monitoring

Kubernetes Pods

PreviousPrev
Next

Understand what a Pod is, why Kubernetes schedules pods instead of raw containers, and how containers share networking and storage inside a pod.

What Is a Pod?

A Pod is the smallest deployable unit in Kubernetes. It wraps one or more tightly related containers that should run together on the same node.

Why Pods Instead of Containers Directly?

Kubernetes needs a scheduling unit that can include more than one cooperating container when necessary. A pod gives Kubernetes that unit.

Examples:

  • one app container by itself
  • an app container plus a sidecar log shipper
  • an app container plus a local proxy

Shared Context Inside a Pod

Containers in the same pod share:

  • the same network namespace
  • the same pod IP address
  • the ability to use shared volumes

That means one container can reach another on localhost inside the same pod.

Pod anatomy

Pod (shared network namespace)

Init Container

Runs to completion before main containers start

Container 1 — main app

Your application process

Container 2 — sidecar

e.g. log forwarder, proxy

Shared network

Same IP & ports

Shared volumes

emptyDir / PVC

Pod IPs and Ephemeral Nature

Each pod gets an IP address, but pods are ephemeral. If a pod is replaced, the replacement usually gets a different IP.

That is why higher-level resources such as Services exist. Services give stable access even when individual pod IPs change.

Sub-pages in This Section

Sub-topicWhat you will learn
Pod ManifestWrite and read complete Pod YAML
Pod LifecycleUnderstand phases, states, and restart behavior
Multi-container PodsSidecars, init containers, and shared volumes
ProbesUse liveness, readiness, and startup probes

When Not to Use Bare Pods

You can create a pod directly, but for most applications you should use a Deployment. Deployments recreate failed pods and manage rolling updates.

Mental Model

Think of a pod as a tiny shared apartment for one or more containers. They can share an address and storage, but they come and go as one unit.

Exercise

Smallest Unit

What is the smallest deployable unit in Kubernetes?

Exercise

Shared Pod Feature

What do containers inside the same pod share?

PreviousPrev
Next

Continue Learning

kubectl apply and delete

Create, update, compare, and remove Kubernetes resources using both declarative manifests and imperative helper commands.

18 min·Easy

kubectl exec, logs, and port-forward

Debug running containers, stream logs, inspect previous crashes, and forward local ports into the cluster.

18 min·Easy

kubectl contexts and namespaces

Understand kubeconfig structure, switch safely between clusters, and scope kubectl commands with namespaces.

18 min·Easy

Explore Related Topics

Do

Docker Tutorials

Build the containers Kubernetes orchestrates

Te

Terraform Tutorials

Provision Kubernetes clusters as code

Try the Tool

YAML Validator

Validate Kubernetes manifests and any YAML files instantly.

On This Page

What Is a Pod?Why Pods Instead of Containers Directly?Shared Context Inside a PodPod IPs and Ephemeral NatureSub-pages in This SectionWhen Not to Use Bare PodsMental Model