What Is Kubernetes and Why Was It Created?
Kubernetes (commonly abbreviated K8s) originated at Google, where engineers had been running containerised workloads at massive scale since the early 2000s using an internal system called Borg. In 2014, Google open-sourced a new system based on Borg's principles and called it Kubernetes (Greek for "helmsman" or "pilot"). It was donated to the Cloud Native Computing Foundation (CNCF) and has since become the de facto standard for container orchestration.
The problem Kubernetes solves: as organisations move to containers and microservices, they quickly face the challenge of managing dozens or hundreds of containers across multiple machines. Manually deciding which container runs on which server, restarting crashed containers, scaling up during traffic spikes, routing traffic to healthy instances, and deploying new versions without downtime is impossibly complex at scale. Kubernetes automates all of this.
Key Concepts Explained in Plain English
Pod
The smallest deployable unit in Kubernetes. A Pod is one or more containers that run together on the same node, share the same network namespace (same IP address), and can share storage volumes. Think of a Pod as a single instance of your application. Kubernetes does not manage containers directly — it manages Pods.
Deployment
A Deployment is a Kubernetes object that describes the desired state for a set of Pods: what container image to run, how many replicas, what resources (CPU/memory) to allocate, and how to update the application (rolling update strategy). Kubernetes continuously reconciles reality with the desired state — if a Pod crashes, Kubernetes restarts it. If you update the image, Kubernetes rolls it out gradually.
Service
A Service provides a stable network endpoint for a group of Pods. Because Pods come and go (they are ephemeral and get replaced with new IPs when restarted), you can't connect to Pods directly. A Service provides a consistent DNS name and load balances traffic across all healthy Pods matching its selector label.
Ingress
An Ingress is a collection of rules for routing external HTTP/HTTPS traffic to Services within the cluster. Think of it as the cluster's front door. An Ingress Controller (typically NGINX or AWS ALB Ingress Controller) implements these rules. You can route different URL paths to different Services — /api to the backend, / to the frontend — all through a single load balancer.
ConfigMap and Secret
ConfigMaps store non-sensitive configuration data (database hostnames, feature flags). Secrets store sensitive data (passwords, API keys). Both are injected into Pods as environment variables or mounted as files. Secrets are base64-encoded by default — not encrypted at rest unless you configure envelope encryption with KMS.
Namespace
Namespaces are virtual clusters within a Kubernetes cluster. They provide isolation between teams or environments. You might have a production namespace, a staging namespace, and a development namespace — all running on the same cluster but isolated with separate resource quotas, network policies, and RBAC permissions.
Why Businesses Use Kubernetes
Self-healing: Kubernetes automatically restarts failed containers, replaces Pods on failed nodes, and removes Pods that fail health checks. Your on-call engineers no longer get 3am pages for "the app is down" caused by a single container crash.
Auto-scaling: the Horizontal Pod Autoscaler (HPA) scales the number of Pod replicas up or down based on CPU utilisation, memory, or custom metrics. The Cluster Autoscaler adds or removes nodes from the underlying node group in response to Pod scheduling needs. Together, they handle traffic spikes automatically.
Rolling deployments: update your application with zero downtime. Kubernetes replaces Pods one at a time (or in batches), waiting for each new Pod to pass health checks before terminating the old one. Rollback is a single command: kubectl rollout undo deployment/myapp.
Consistent environments: the same container image that ran in development runs in staging and production. No more "it works on my machine" — the environment is defined in code (YAML manifests) and is reproducible.
When Kubernetes Is Overkill
Kubernetes is not the right answer for everyone. It adds significant operational complexity: a learning curve of 3 to 6 months for a team new to it, ongoing management of cluster upgrades, node security patching, networking configuration, and a large surface area of things that can go wrong. Before adopting K8s, ask whether simpler alternatives meet your needs:
Under 5 services, small team: Docker Compose for local development and AWS ECS for production is dramatically simpler. ECS handles auto-scaling, rolling deployments, and health checks with far less configuration than Kubernetes.
Startup in early product phase: use Railway, Render, or Fly.io. These fully managed PaaS platforms handle container deployment, SSL, custom domains, and basic scaling with zero infrastructure management. Focus on your product, not your platform.
When Kubernetes Is the Right Choice
Kubernetes makes sense when: you have 10 or more microservices that need independent scaling, you need fine-grained resource allocation across multiple teams, you require advanced deployment patterns (canary deployments, A/B testing, blue-green), your team has Kubernetes expertise, or you are operating at enterprise scale where ECS's simpler feature set becomes limiting.
Managed Kubernetes: EKS vs GKE vs AKS
| Feature | EKS (AWS) | GKE (GCP) | AKS (Azure) |
|---|---|---|---|
| Control plane cost | £0.10/hr (~£73/mo) | Free (Standard mode) | Free |
| Maturity | High | Highest (K8s creator) | High |
| Fully-managed nodes | Fargate (limited), Karpenter | Autopilot mode (fully managed) | Virtual Nodes (ACI) |
| Upgrade experience | Manual or managed node groups | Automatic, zero-downtime | Auto-upgrade available |
| AWS integration | Native (IAM, ALB, EBS, RDS) | Via connectors | Via connectors |
| Active Directory integration | Via OIDC | Via OIDC | Native (Entra ID) |
| Best for | AWS-native teams, deep AWS integration | Easiest managed K8s, data/ML teams | Microsoft/Azure-centric organisations |
Example: Kubernetes Deployment and Service for a FastAPI App
# deployment.yaml — FastAPI application Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: api
namespace: production
labels:
app: api
version: "1.0"
spec:
replicas: 3
selector:
matchLabels:
app: api
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 1
template:
metadata:
labels:
app: api
spec:
containers:
- name: api
image: 123456789.dkr.ecr.eu-west-2.amazonaws.com/my-api:1.0.0
ports:
- containerPort: 8000
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: api-secrets
key: database-url
- name: ENVIRONMENT
value: "production"
resources:
requests:
cpu: "250m"
memory: "256Mi"
limits:
cpu: "500m"
memory: "512Mi"
livenessProbe:
httpGet:
path: /health
port: 8000
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /health
port: 8000
initialDelaySeconds: 5
periodSeconds: 10
imagePullSecrets:
- name: ecr-credentials
---
# service.yaml — Service to expose the Deployment
apiVersion: v1
kind: Service
metadata:
name: api-service
namespace: production
spec:
selector:
app: api
ports:
- protocol: TCP
port: 80
targetPort: 8000
type: ClusterIP
---
# hpa.yaml — Horizontal Pod Autoscaler
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: api-hpa
namespace: production
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: api
minReplicas: 3
maxReplicas: 20
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 60
Alternatives for Smaller Teams
AWS ECS (Elastic Container Service): AWS's own container orchestration service. Simpler than EKS, deeply integrated with AWS services (ALB, IAM, CloudWatch). Fargate mode is fully serverless — no node management at all. Perfect for teams that want managed containers without Kubernetes complexity.
Docker Compose: for development and small-scale production environments, Docker Compose orchestrates multiple containers on a single host with a simple YAML file. Not suitable for production at scale, but excellent for development environments and small internal tools.
Railway / Render / Fly.io: fully managed PaaS platforms that handle deployment, scaling, networking, and SSL with minimal configuration. Ideal for startups and small teams. Railway in particular has become very popular for deploying web applications and APIs with zero infrastructure expertise required.
Not Sure Whether You Need Kubernetes?
SpiderHunts Technologies will assess your application architecture and recommend the right container platform — whether that's EKS, ECS, or something simpler. We set it up correctly the first time, so you don't have to undo decisions that don't scale.
Get a Container Platform Assessment