
Packaging an app in a container (see our Docker guide) is great; but with hundreds of containers, several servers and constant updates, management becomes hard. Kubernetes (K8s) is an open source orchestration platform that deploys, scales and keeps containers running automatically (see our open source guide). This guide explains the core concepts and when you need it in plain terms.
What does Kubernetes do?
- Automatic deployment: rolling out a new version without downtime.
- Scaling: increasing the number of copies as load grows.
- Self-healing: restarting a crashed container.
- Load balancing: spreading requests across copies (see our load balancer guide).
- Configuration and secret management.
- Portability: running the same way on different clouds (see our cloud providers guide).
Core concepts
| Concept | Meaning |
|---|---|
| Container | A package of an app and its dependencies |
| Pod | The smallest unit in which one or a few containers run |
| Node | The machine (virtual or physical) where pods run |
| Cluster | The whole formed by nodes |
| Deployment | Defines how many copies run and updates |
| Service | Gives pods a stable network address |
| Namespace | Separates resources logically |
| ConfigMap / Secret | Configuration and secret data |
- 1
You package the app as a container image
- 2
You define how many copies you want with a Deployment
- 3
Kubernetes places the pods on suitable nodes
- 4
A Service routes traffic to the pods
- 5
If a pod crashes a new one starts automatically
The desired-state logic
In Kubernetes you don't say "run this"; you define the state you want (for example 3 copies). The system constantly compares the actual state with this target and closes the gap. Definitions are usually written in YAML files and kept in version control (see our GitHub guide).
When do you need Kubernetes?
| Situation | Suggestion |
|---|---|
| One small site | Usually unnecessary; simple hosting is enough (see our VPS guide) |
| A few services | Docker Compose or a managed platform first |
| Many services, high scale | Kubernetes may make sense |
| Multi-cloud or portability need | Kubernetes is an advantage |
| No team experience | Managed services or serverless options (see our serverless guide) |
Managed Kubernetes
Setting up and running a cluster yourself is complex. Large cloud providers offer managed Kubernetes; they run the control plane. For cost see our cloud cost optimisation guide.
Learning roadmap
- Linux and networking basics (see our Linux guide).
- Docker and container logic.
- Trying a local cluster (with small tools).
- Pod, Deployment and Service concepts.
- Configuration with YAML, ConfigMap and Secret.
- Monitoring, logging and security.
Security notes
- Don't write secrets into source code; use Secrets and secure management.
- Limit access with least privilege (see our zero trust guide).
- Take images from trusted sources and keep them updated.
- Don't leave management interfaces open to the internet.
Common mistakes
- Setting up Kubernetes unnecessarily for a small project.
- Not defining resource limits.
- Storing secrets in plain text.
- Skipping monitoring and backups.
- Not updating the cluster.
Frequently asked questions
How does it differ from Docker? Docker creates containers; Kubernetes manages many containers.
What does K8s mean? There are 8 letters between the "K" and the "s" in Kubernetes.
Is it hard to learn? It has many concepts; go step by step.
Summary
Kubernetes is an orchestration platform that deploys, scales and heals containers automatically. Learn the pod, node, deployment and service concepts, but prefer simple solutions for small projects.
Serkan Akyürek is the founder and author of toolrota; he writes step-by-step guides on Excel, AI, the cloud, personal finance and digital security.