Kubernetes 00:00:01 A three-counter plan becomes three running processes A festival asks for three checkout replicas. The operator submits a Deployment, but the API response alone has not opened a single counter. Follow the controllers and the nodes until the requested replicas actually report ready. kubectl apply sends a Deployment with three replicas. The API server checks who you are, what you may do, admission rules and the schema. The API server writes the object to etcd, which commits when a majority of its members has it. The Deployment controller makes a ReplicaSet. Its controller sees 0 of 3 and creates three Pod objects. The scheduler chooses feasible nodes for pending Pods. Requests for CPU and memory help determine whether a Pod fits. The kubelet of each chosen node sees its pods, asks the runtime to pull the image, and starts the containers. Once the containers run and the required readiness conditions pass, the ready count can match the desired count. This is reconciliation. The stored desired state can exist while the real workload is still starting, waiting for capacity, or failing its readiness checks. 00:01:08 Replace the checkout without dropping all counters The festival publishes a corrected image. This rollout permits one extra replica and requires the three intended replicas to remain available. That policy consumes temporary spare capacity. Three version-one replicas are ready. The configured surge and availability budgets govern the controller's replacement sequence. A v2 pod starts. It gets no traffic until its readiness probe passes. When the new replica becomes available, a version-one replica can begin termination. Its configured grace period allows orderly shutdown. The same happens for the second. All pods are v2. The old ReplicaSet stays with zero pods, so kubectl rollout undo can bring it back. Readiness and shutdown are separate. A new serving endpoint must pass its check, while an old endpoint may need time to finish in-flight work. Test the replacement under real request durations. 00:02:03 More replicas can still mean no new capacity Two checkout replicas average ninety-eight percent of their requested processor capacity during the rush. The operator targets seventy percent. Predict the recommended replica count before searching for spare machines. Two pods at 65% of their CPU request, target 70%. The ratio is 0.93, inside the tolerance, so nothing changes. Under the simplified proportional calculation, the autoscaler asks for the third replica. Missing metrics, tolerance and stabilization can affect real decisions. The third pod is Pending. No node has enough unrequested CPU. In this installation a node autoscaler provisions a suitable machine. The pending replica still has to start and become ready. Load falls. For five minutes the highest recent answer wins, so a short dip does not remove pods. Two times ninety-eight divided by seventy gives two point eight. Rounding up asks for three. A desired Pod that cannot be scheduled is not a ready checkout counter. 00:03:07 Give customers a stable shop address A replacement Pod gets a new network address. Customers should not have to discover that address themselves. In this example they use the Service name and a stable virtual address. The name api resolves to the Service address 10.96.0.10. The service data plane selects one eligible endpoint for this connection. Its exact selection algorithm depends on the implementation. A failing readiness check removes that endpoint from ordinary ready traffic once the updated information propagates. Pod 1 is replaced by pod 3 with a new address. The list is updated, the name is not. Endpoint data changes independently of the Service name. Existing connections and propagation delays still matter, so a stable address alone does not make every request successful during a transition. 00:04:01 Rehearse the version that never becomes ready At the final rehearsal the new checkout image immediately crashes. Watch the available count as the unhealthy replica restarts. Should the deployment quietly reverse itself when progress stops? v2 starts beside three v1 pods. The failing container restarts with backoff and does not pass readiness. In this rollout the healthy old replicas remain available. After 600 s the Deployment reports that progress stopped. Nothing rolls back on its own. kubectl rollout undo restores v1 and removes the bad pod. A progress deadline can report a stalled rollout. An operator or an additional deployment controller decides whether to roll back. Inspect desired, scheduled and ready separately before declaring the festival open.