Kubernetes is an open-source container orchestration platform that schedules containers onto a cluster of machines, keeps them running, scales them and handles service discovery and rolling updates.
Why it matters
You declare the desired state, such as three replicas of a web app, and Kubernetes continuously works to match it. If a container or node fails, it starts replacements elsewhere. It also supports rolling updates and rollbacks, which reduces deployment downtime.
The cost is complexity. Running a cluster requires networking, storage, security and upgrade knowledge, so many small projects are better served by simpler platforms or a managed Kubernetes service.
Example
apiVersion: apps/v1
kind: Deployment
metadata:
name: web
spec:
replicas: 3
selector:
matchLabels: {app: web}
template:
metadata:
labels: {app: web}
spec:
containers:
- name: web
image: myapp:1.4
If one of the three pods dies, Kubernetes creates a new one.
Common mistakes
- Adopting Kubernetes for a single small app that a VPS could host.
- Omitting resource requests and limits, so one pod starves others.
- Missing readiness probes, which sends traffic to pods that are not ready.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.