Kubernetes

Kubernetes (often abbreviated K8s) is an open-source container orchestration platform originally developed by Google that automates the deployment, scaling, and management of containerized applications across a cluster of servers. The core building block is the Pod — one or more containers that share a network and storage. Deployments manage how many Pod replicas run and handle rolling updates; Services expose Pods to network traffic with stable addresses; ConfigMaps and Secrets inject configuration without rebuilding images; and Horizontal Pod Autoscalers scale replica counts based on CPU or custom metrics. Every major cloud provider offers a managed Kubernetes service: AWS EKS, Azure AKS, Google GKE, and OCI OKE. When would you use Kubernetes? Kubernetes is appropriate when you're running multiple containerized microservices that each need independent scaling, when you need zero-downtime rolling deployments, when you're managing workloads that benefit from declarative infrastructure (desired-state management), or when you need portability across cloud providers. For simple single-service deployments, ECS Fargate, App Service, or Cloud Run may be simpler alternatives. Common mistakes: treating Kubernetes as a simple 'containers on a server' solution without understanding its operational complexity (networking, storage, RBAC, and observability all require deep investment), using latest image tags (always pin to a specific digest for production workloads), not setting resource requests and limits on containers (unset limits cause noisy-neighbor problems and unpredictable scheduling), placing stateful databases inside Kubernetes without understanding Persistent Volumes (many teams use RDS or managed databases instead), and skipping RBAC configuration (every workload should have the minimum permissions needed via dedicated ServiceAccounts).

Example: An e-commerce platform runs its checkout service as a Kubernetes Deployment with 3 replicas. During Black Friday, a Horizontal Pod Autoscaler detects high CPU and automatically scales to 20 replicas across 5 nodes — then scales back down overnight without any manual intervention. Architecture use case: a fintech company uses EKS to run 12 microservices (auth, payments, notifications, etc.), each in its own Deployment with individual HPA policies, separate Namespaces for isolation, and Istio service mesh for encrypted inter-service communication and traffic observability.

Category: containers

Difficulty: advanced