Tutorial

Kubernetes Tutorial

Learn Kubernetes from scratch: architecture, Pods, Deployments, Services, ConfigMaps, Secrets, storage, Helm and monitoring, with hands-on kubectl examples.

40 lessons in this tutorial

1

Introduction to Kubernetes

What Kubernetes is, the problem it actually solves, how it compares to Docker Compose, the core objects you need first, and whether you need it at all.

2

Kubernetes Architecture

The control plane and node components explained, API server, etcd, scheduler, kubelet, kube-proxy, and what breaks when each one fails.

3

Installing Kubernetes

Choose how to run Kubernetes, kind, minikube, Docker Desktop, k3s or a managed cloud cluster, with an honest comparison of what each is good and bad at.

4

Installing Kubernetes with Minikube

Set up a local Kubernetes cluster with minikube. Drivers, sizing, add-ons for Ingress and metrics, minikube tunnel, and using its Docker daemon for fast builds.

5

Installing Kubernetes with kind

Run multi-node Kubernetes in Docker with kind. Cluster config, loading local images, port mappings for Ingress, pinning versions, and using it in CI.

6

Installing kubectl

Install and configure kubectl on macOS, Linux and Windows. Version skew rules, kubeconfig, shell completion, and the plugins worth having from day one.

7

kubectl Basics

How kubectl talks to the cluster, imperative vs declarative workflows, apply vs create, output formatting, and the commands you will use every day.

8

kubectl get and describe

Inspect Kubernetes resources with get and describe. Output formats, label and field selectors, jsonpath, and reading the events that explain most failures.

9

kubectl apply and delete

Manage Kubernetes objects declaratively. Apply vs create vs replace, server-side apply, kubectl diff, cascading deletion, and force-deleting a stuck resource.

10

kubectl exec, logs, and port-forward

Debug running workloads. Reading logs including crashed containers, getting a shell inside a Pod, ephemeral debug containers, and tunnelling a local port.

11

kubectl contexts and namespaces

Work safely across multiple clusters. How kubeconfig is structured, switching contexts and namespaces, and avoiding the wrong-cluster mistake.

12

Kubernetes Pods

What a Pod is and why Kubernetes schedules pods rather than containers. Shared networking and storage, and debugging Pending and CrashLoopBackOff.

13

Kubernetes Pod Manifest

Read and write Pod YAML. Required fields, containers, ports, environment, volumes, securityContext, and the fields that are immutable once created.

14

Kubernetes Pod Lifecycle

Pod phases and container states explained. Pending to Running to Succeeded, restart policy and backoff, termination and SIGTERM, and how to read a Pod's status.

15

Multi-container Pods

When a Pod should hold more than one container. Init containers, native sidecars, the adapter and ambassador patterns, and when to use two Pods.

16

Kubernetes Probes

Liveness, readiness and startup probes explained. What each one controls, the timing fields that matter, and the misconfigurations that cause outages.

17

Kubernetes Deployments

How Deployments manage ReplicaSets and pods, how rolling updates and rollbacks actually work, and how to debug a rollout that never finishes.

18

Creating Kubernetes Deployments

Write, apply, inspect and scale a Deployment: the required fields, the immutable selector, how ReplicaSets relate to it, and the errors you meet first.

19

Kubernetes Rolling Updates

How rolling updates work in Kubernetes, maxSurge and maxUnavailable, why readiness probes make them safe, graceful shutdown, and diagnosing a stalled rollout.

20

Kubernetes Rollbacks

Undo a bad deployment with kubectl rollout undo. How revision history works, recording change causes, revisionHistoryLimit, and what a rollback cannot fix.

21

Kubernetes Services

How Services give pods stable networking. ClusterIP, NodePort, LoadBalancer and headless, DNS naming, port vs targetPort, and why a Service has no endpoints.

22

Kubernetes Service: ClusterIP

The default Kubernetes Service type. Internal virtual IPs, DNS naming, how kube-proxy implements it, headless Services, and debugging an empty endpoint list.

23

Kubernetes Service: NodePort

Expose a Service on a static port across every node. How NodePort layers on ClusterIP, the 30000-32767 range, externalTrafficPolicy, and when not to use it.

24

Kubernetes Service: LoadBalancer

Provision a cloud load balancer for a Kubernetes Service. Annotations, externalTrafficPolicy, cost at scale, EXTERNAL-IP pending, and MetalLB on bare metal.

25

Kubernetes Ingress

Route external HTTP traffic to Services with Ingress. Controllers, host and path rules, pathType, TLS with cert-manager, and why your Ingress returns 404.

26

ConfigMaps and Secrets

Separating configuration from images. ConfigMaps vs Secrets, env vars vs volume mounts, which updates live, and what Secrets really protect.

27

Kubernetes ConfigMaps

Create ConfigMaps from literals, files or YAML and consume them as environment variables or mounted files, including why updates sometimes do not appear.

28

Kubernetes Secrets

Create and consume Kubernetes Secrets for passwords, registry credentials and TLS material, plus what base64 does not protect and how production teams handle it.

29

Kubernetes Storage

How Kubernetes separates workloads from durable data. Ephemeral vs persistent volumes, emptyDir, hostPath, PVs and PVCs, access modes and when to use each.

30

Persistent Volumes and PersistentVolumeClaims

How PVs and PVCs bind, what the access modes and reclaim policies really mean, how to expand a volume, and how to recover data from a released PV.

31

Kubernetes StorageClasses

Dynamic volume provisioning with StorageClasses. Provisioners, parameters, reclaim policy, volumeBindingMode, expansion, and setting a sensible default.

32

Kubernetes Namespaces

How namespaces partition a cluster. What is and is not namespaced, cross-namespace DNS, quotas and RBAC, and why a namespace can get stuck Terminating.

33

Kubernetes Resource Management

How CPU and memory requests and limits drive scheduling, throttling and eviction in Kubernetes. QoS classes, units, and the defaults that cause outages.

34

Kubernetes Requests and Limits

Set CPU and memory requests and limits correctly. Enforcement behaviour, QoS classes, LimitRange defaults, and how to diagnose throttling and OOMKilled.

35

Horizontal Pod Autoscaler

Scale Kubernetes workloads automatically with the HPA. How the replica formula works, why it needs resource requests, scaling behaviour, and custom metrics.

36

Helm for Kubernetes

What Helm is and when it earns its complexity. Charts, releases, repositories, how upgrades and rollbacks work, and how it compares to Kustomize.

37

Installing and Using Helm

Install Helm on macOS, Linux or Windows, add repositories, and run the install, upgrade, rollback and uninstall commands that make up the daily workflow.

38

Understanding Helm Charts

Helm chart structure explained. Chart.yaml, values.yaml, templates, built-in objects, helpers, dependencies, and how to debug a template that renders wrongly.

39

Helm Values, Upgrades, and Rollbacks

Override Helm chart configuration with values files and --set, understand precedence, upgrade safely with --atomic, and roll back when a release goes wrong.

40

Kubernetes Monitoring

Monitor a Kubernetes cluster properly, metrics-server vs Prometheus, kube-state-metrics, the signals that matter, logging, and alerts worth waking up for.