Kubernetes: container orchestration platform managing containers at scale. Automates deployment, scaling, networking. Benefits: high availability, scaling, rolling updates, self-healing. Abstracts underlying infrastructure. Steep learning curve but essential for production container management.
Pod: smallest unit, one or more containers. Deployment: manages replica sets, rolling updates. Service: stable network endpoint for pods. LoadBalancer: external access. ClusterIP: internal access. Ingress: HTTP routing. ConfigMap: configuration, Secret: sensitive data.
Master node: control plane (API server, scheduler, controller-manager, etcd). Worker nodes: run pods. Kubelet: agent on worker node. API server: central point for all communication. Scheduler: places pods on nodes. High availability requires multiple master nodes.
Namespaces: virtual clusters within cluster for isolation. Different namespaces for dev/staging/prod. Labels: key-value pairs for organizing resources. Selectors: query objects by labels. Enable multi-tenancy and resource organization.
Volumes: temporary storage, deleted with pod. PersistentVolume (PV): cluster-level storage. PersistentVolumeClaim (PVC): request for storage. StatefulSet: ordered, stable identity, persistent storage. StorageClass: provision storage dynamically.
Ingress: expose HTTP/HTTPS routes externally. Ingress controller: implements ingress rules. Route based on hostname, path. HTTPS termination, load balancing. External access without NodePort/LoadBalancer.
Horizontal Pod Autoscaler (HPA): scales pods based on CPU/memory metrics. VerticalPodAutoscaler (VPA): right-sizes pods. Cluster Autoscaler: scales nodes. Define min/max replicas. Requires metrics server.