What is Kubernetes?
Kubernetes (K8s) is an open-source container orchestration platform that automates the deployment, scaling, and management of containerized applications.
Why Kubernetes?
When running containers at scale, you need to answer:
- How do you deploy containers across multiple hosts?
- How do you scale up or down based on demand?
- What happens when a container crashes?
- How do containers communicate with each other?
- How do you update applications without downtime?
Key Features
- Self-healing: Automatically restarts failed containers
- Horizontal scaling: Scale apps up/down based on demand
- Service discovery: Built-in DNS and load balancing
- Automated rollouts: Deploy updates with zero downtime
- Secret management: Manage sensitive information
- Storage orchestration: Mount storage systems automatically
Kubernetes vs Docker
| Docker | Kubernetes |
|---|---|
| Runs containers | Orchestrates containers |
| Single host | Multiple hosts (cluster) |
| Manual scaling | Auto-scaling |
| docker-compose for multi-container | Native multi-container support |