Kubernetes (K8s) orchestrates containers across clusters of machines. It handles deployment, scaling, load balancing, and self-healing.
Core concepts: Pod (smallest deployable unit, 1+ containers), Service (network endpoint for pods), Deployment (desired state for pods), ConfigMap and Secret (configuration).
kubectl is the CLI: kubectl apply -f deployment.yml, kubectl get pods, kubectl logs pod_name, kubectl scale deployment --replicas=5.
Namespaces isolate resources. Ingress manages external access (HTTP routing). Persistent Volumes store stateful data.
When to use Kubernetes: microservices architecture, need auto-scaling, multiple teams deploying independently. When to avoid: simple apps, small teams, monolithic deployments.
Managed Kubernetes: AWS EKS, Google GKE, Azure AKS. They handle control plane management. Start with these rather than self-hosted.
Helm charts package Kubernetes manifests. They simplify deployment of complex applications with templates and values.