Skip to main content

What is Kubernetes?

Kubernetes (K8s) is a container orchestration platform. It takes your containerized applications and runs them across a cluster of machines with self-healing, scaling, rolling deployments, and service discovery built in.

But here is the real question: do you actually need it?

You need Kubernetes when...

  • You have 5+ microservices that need to communicate, scale independently, and deploy on different cadences
  • You need rolling deployments with zero downtime as a hard requirement
  • Your traffic is bursty or unpredictable and you need horizontal autoscaling that reacts in seconds, not minutes
  • You have multi-team ownership of services and need namespace isolation, RBAC, and resource quotas
  • You are running stateful workloads (databases, queues, ML training) alongside stateless ones in the same infrastructure
  • You need portable infrastructure across clouds or hybrid environments

You do NOT need Kubernetes when...

Stop. Think before you adopt Kubernetes.

The number one mistake beginners make is adopting Kubernetes for a 2-service application that could run perfectly well on Azure Container Apps or even App Service. Kubernetes adds operational complexity. If you don't need what it gives you, it will only slow you down.

  • You have 1-3 services with predictable traffic -- use Azure Container Apps instead
  • You are building a monolith or a simple API -- use App Service
  • You want zero infrastructure management -- use Azure Container Apps with scale-to-zero
  • Your team has no container experience and no time to learn -- start with Container Apps, graduate to AKS later
  • You need event-driven serverless with sub-second cold starts -- use Azure Functions

The path: containers to orchestration

Here is how the progression works in the real world:

  1. You containerize your app -- Docker gives you reproducible builds and consistent environments
  2. You need to run multiple containers -- Docker Compose works on a single machine, but production needs resilience
  3. You need orchestration -- Something must decide which machine runs which container, restart failures, route traffic, and manage secrets
  4. You pick an orchestrator -- Kubernetes won the orchestration war. Everything else (Docker Swarm, Mesos, Nomad) is niche or dead
# This is a Kubernetes Deployment. It tells K8s:
# "Run 3 copies of my app, restart them if they crash,
# and roll out new versions with zero downtime."
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-api
spec:
replicas: 3
selector:
matchLabels:
app: my-api
template:
metadata:
labels:
app: my-api
spec:
containers:
- name: my-api
image: myregistry.azurecr.io/my-api:v1.2.0
ports:
- containerPort: 8080
resources:
requests:
cpu: "250m"
memory: "256Mi"
limits:
cpu: "500m"
memory: "512Mi"

Core concepts you must know

ConceptWhat It DoesWhy It Matters
PodSmallest unit. One or more containers sharing network/storage.You almost never create Pods directly. Use Deployments.
DeploymentManages replicas and rolling updates.This is your bread and butter. Every stateless service is a Deployment.
ServiceStable internal DNS name and load balancer for Pods.Pods are ephemeral. Services give them a permanent address.
IngressExternal HTTP/HTTPS routing into your cluster.Without this, nothing outside the cluster can reach your apps.
NamespaceLogical isolation boundary.Use one per team or per environment (dev/staging/prod).
ConfigMapNon-secret configuration data.Decouple config from container images. Change config without redeploying.
SecretSensitive data (passwords, keys, certs).Never bake secrets into images. Always use Secrets or external vaults.
PersistentVolumeClaimRequest for durable storage.Required for databases, file storage, anything that survives Pod restarts.
HorizontalPodAutoscalerScales Pod replicas based on metrics.Without this, you are either overprovisioned or about to crash.

Why managed Kubernetes (not self-managed)

Strong recommendation

Do not run self-managed Kubernetes unless you have a dedicated platform team of 3+ engineers. Self-managed K8s means you own: etcd backup/restore, control plane upgrades, certificate rotation, API server availability, and every CVE patch. That is a full-time job for multiple people.

Use a managed service like AKS. Here is why:

ConcernSelf-ManagedAKS (Managed)
Control plane availabilityYour problem (etcd quorum, API server HA)Microsoft's SLA (99.95% with Standard tier)
Kubernetes upgradesManual, risky, multi-hour processOne command or fully automated channels
Security patchingYou track CVEs and patch yourselfNode image auto-upgrades available
Certificate managementYou rotate certs before expiryHandled automatically
Cost of control planeYou pay for those VMsFree. You pay zero for the control plane.
NetworkingYou wire up CNI, load balancers, DNSAzure-native integration out of the box

The only legitimate reasons to self-manage:

  • Air-gapped environments with no cloud connectivity
  • Exotic hardware (edge, bare metal, specialized GPUs not available in cloud)
  • Regulatory requirements that literally prohibit managed services (rare)

Kubernetes vs. alternatives decision table

ScenarioRecommendationWhy
1-3 stateless services, predictable trafficAzure Container AppsSimpler, cheaper, scale-to-zero, no K8s knowledge needed
5+ services, multiple teams, complex networkingAKSYou need the orchestration power
Event-driven, sporadic workloadsAzure FunctionsPurpose-built for this, sub-second scaling
Monolith or simple web appApp ServiceManaged platform, no containers needed
ML training pipelinesAKS with GPU node poolsK8s GPU scheduling is mature and well-supported
Hybrid/multi-cloud mandateAKS + Azure ArcConsistent K8s across environments

The learning curve: what to focus on first

Kubernetes has a massive API surface. Do not try to learn everything at once. Here is the order that matters:

  1. Week 1: Pods, Deployments, Services. Get an app running and reachable.
  2. Week 2: ConfigMaps, Secrets, resource requests/limits. Make your app configurable and stable.
  3. Week 3: Namespaces, RBAC, Ingress. Isolate workloads and expose them properly.
  4. Week 4: HPA, PersistentVolumeClaims, health probes. Make your app resilient and scalable.
  5. After that: StatefulSets, DaemonSets, CRDs, Operators, service mesh -- only when you need them.
What NOT to learn early

Do not start with Helm charts, Operators, or service meshes. These are advanced patterns that solve problems you do not have yet. Learn the primitives first. If you cannot deploy an app with raw YAML, you should not be abstracting it with Helm.

Common beginner mistakes

MistakeConsequenceFix
No resource requests/limitsPods get scheduled anywhere, OOMKilled randomlyAlways set requests. Set limits for memory.
No liveness/readiness probesK8s cannot tell if your app is healthy, sends traffic to broken PodsAdd probes from day one. Even a simple TCP check.
Using latest image tagYou have no idea what version is running, rollbacks are impossibleAlways use specific version tags (:v1.2.3).
Storing state in local diskPod restarts lose all dataUse PersistentVolumeClaims for any data that must survive restarts.
One giant namespaceNo isolation, RBAC is all-or-nothing, resource quotas impossibleOne namespace per team or per service boundary.
Ignoring Pod disruption budgetsCluster upgrades take down all replicas simultaneouslySet PDBs so at least N-1 replicas stay running during maintenance.

Resources


Next: What is AKS? -- where we go deep on Azure's managed Kubernetes offering.