Skip to content
SeeItFlow
Interactive guide · 8 chapters · ~20 min read

Kubernetes Engineering Insights

The comparisons, trade-offs and mistakes that separate a surface-level understanding of Kubernetes from real engineering judgment.

Mangesh MandlikLast updated:
01 · The core motivation

Why Kubernetes Exists

Kubernetes exists because running containers reliably at scale is a fundamentally different problem than running one container on one machine.

Once you have more than a handful of containers across more than one host, you need answers to: which host runs which container, what happens when a host dies, how do containers find each other, how do you deploy a new version without downtime, and how do you scale up under load. Kubernetes is a standardized, battle-tested answer to all of these at once.

02 · The comparison everyone asks about

Docker vs Kubernetes

These aren't competitors — Kubernetes orchestrates containers, and those containers are typically built and run using Docker (or another OCI-compatible runtime).

Docker answers "how do I package and run this application as an isolated process?" Kubernetes answers "given many such containers across many machines, how do I keep them running, route traffic to them, and update them safely?" You need both concepts even if a cluster today uses containerd directly instead of the Docker daemon.

03 · The smallest unit

Pod vs Container

A container is a single isolated process; a Pod is Kubernetes' unit of scheduling — one or more containers that always run together.

Most Pods run exactly one container, so the distinction can feel academic — until you need a sidecar (a logging agent, a service mesh proxy) that must share the same network namespace and lifecycle as the main container. That's precisely what a multi-container Pod is for.

04 · Two layers, two jobs

Deployment vs ReplicaSet

A ReplicaSet's only job is keeping N Pods running. A Deployment's job is managing transitions between different generations of ReplicaSets.

05 · Internal vs external routing

Kubernetes Service vs Ingress

In the Kubernetes Service vs Ingress choice, a Service load-balances at the connection/IP level; Ingress adds HTTP-aware routing (hostnames, paths, TLS) in front of one or more Services.

A ClusterIP Service alone has no concept of URL paths or hostnames — it just forwards to whichever Pods match its selector. Ingress sits a layer above, inspecting HTTP requests and deciding which Service (and therefore which set of Pods) should handle them.

ServiceIngress
Routing levelConnection/IP levelHTTP-aware routing
Hostnames and pathsNot understood; forwards to Pods matching its selectorRoutes by hostname and path, and handles TLS
Routes traffic toThe Pods that match its selectorOne or more Services
06 · Different failure semantics

Readiness vs Liveness

Liveness answers "should this be restarted?"; readiness answers "should this receive traffic right now?" — conflating them can cause outages.

07 · Same mechanism, different intent

ConfigMap vs Secret

Structurally near-identical — both inject key-value data into Pods — but Secrets exist for a different purpose and carry different handling guarantees.

ConfigMaps are plain text, meant for non-sensitive values. Secrets are base64-encoded (not encrypted by default) and typically subject to tighter RBAC — but base64 is encoding, not encryption, so production systems usually pair Secrets with encryption-at-rest or an external secret manager.

08 · Judgment calls

Stateless vs Stateful, Desired vs Current State, and When Kubernetes Is Overkill

Kubernetes shines for stateless, horizontally-scalable workloads; stateful workloads are supported but require more deliberate care (StatefulSets, PVCs, careful storage choices).

Stateless workloads

Any Pod can serve any request; Pods are fully interchangeable and disposable. This is Kubernetes' strongest use case.

Stateful workloads

Databases, queues — identity and storage matter per instance. Kubernetes supports this (StatefulSets, PVCs) but it demands more careful modeling than stateless apps.

Desired State vs Current State

The entire reconciliation model: controllers exist to continuously close the gap between what you asked for and what's actually running.

Key takeaways
  1. 01Kubernetes and Docker solve different, complementary problems — packaging vs orchestration.
  2. 02Every 'vs' comparison in Kubernetes (Deployment/ReplicaSet, Service/Ingress, ConfigMap/Secret, readiness/liveness) comes down to separation of concerns: each object does one narrow job well.
  3. 03The desired-state reconciliation model is the single idea underlying self-healing, rollouts, rollbacks and autoscaling.
  4. 04Kubernetes' complexity is proportional to the problems it solves — for small, simple, low-scale deployments, that complexity can outweigh the benefit.