Kubernetes
Kubernetes is the industry standard for container orchestration, responsible for reliably scheduling, running and scaling hundreds or thousands of containerized applications across a group of machines. It brings the operations paradigm of "declare the desired state and let the system continuously converge" into the infrastructure layer, and is the foundation of the cloud native technology stack.
Core Principles
Kubernetes adopts a control loop architecture. Users submit declarative configuration to the API server stating the desired state; controllers continuously compare the desired state with the actual state and take corrective action. The system is composed of several loosely coupled components working together: the API server is the single entry point, responsible for validation and persistence; etcd stores all cluster state; the scheduler picks nodes for workloads waiting to run; and the agent on each node actually launches containers and reports status.
The smallest scheduling unit is the Pod, one or more tightly cooperating containers that share a network namespace and storage volumes, with containers inside a Pod communicating over the local loopback. Pods are disposable and will be recreated.
Deployment manages a replica set for stateless applications, supporting rolling updates and version rollback, and ensuring the desired number of replicas stay alive through replica sets. Service provides a stable virtual address and load balancing for a group of Pods, shielding the reality that Pod addresses change frequently; Ingress handles layer seven ingress routing.
Operator is the core of the extension mechanism: it encodes domain operations knowledge into custom resources and controllers, so that stateful systems such as databases and message queues can be managed declaratively. This is the key design that let Kubernetes move from running stateless applications to running everything.
Self-healing comes from continuous comparison: when a node goes down, the Pods running on it are rescheduled to other nodes; when a container process exits it is recreated according to the restart policy; readiness probes and liveness probes decide respectively whether traffic is admitted and whether the container is restarted, and the thresholds of these two probes directly affect availability during a rollout.
The network model uses a flat address space in which each Pod has its own address and cross-node communication is implemented by network plugins, so service discovery and access policy are parts that must be considered together at selection time, and different plugins differ considerably in performance and in the difficulty of troubleshooting.
Key Points
Architecturally, the control plane and worker nodes must be distinguished. The control plane makes decisions, worker nodes execute them, and the two interact only through the API server.
Core resources also include configuration and secret management, persistent volumes, namespace isolation, and resource requests and limits.
GPU scheduling is a current focus: nodes report the number of GPUs through device plugins, Pods declare how many GPUs they need in their resource requests, and the scheduler binds them to nodes with available capacity. GPUs are non-shareable resources and fragment badly, so node pools, affinity and topology awareness must be set reasonably to prevent cards being occupied in scattered fragments that leave large jobs unschedulable. Multi-GPU training must also consider the interconnect topology between cards within a node.
Selection judgment: with many services, a need for elastic scaling and self-healing, and a dedicated platform team, Kubernetes delivers clear benefits. Putting a handful of small services from a single machine onto a cluster instead lets operational complexity and cost crush a small team, which is the most common form of overuse. Managed clusters can reduce the control plane burden, but networking, storage and permissions still require real expertise.
Permissions and multi-tenancy are equally unavoidable: namespaces provide logical isolation, but resource quotas, network policies and image pull credentials all need to be configured layer by layer, otherwise a single mistaken operation by one team can fill the entire cluster or expose a critical service to unrelated traffic.
Common Misconceptions
The first is not setting resource requests and limits, so the scheduler cannot pack workloads sensibly and nodes frequently suffer resource contention. The second is forcing stateful applications in as if they were stateless, ignoring persistence and ordered startup. The third is assuming it comes with monitoring and logging, when observability actually requires additional components.
Application Scenarios
Microservice deployment, containerization migration, platforms for machine learning training and inference, dynamic execution environments for CI pipelines, consistent delivery across environments, and scenarios that must absorb elastic traffic.