Full lesson
Explore the full explanation, examples, and visuals at your own pace.
Part 1
Who keeps the web app running across servers? Docker runs each container; Kubernetes coordinates the Pods as one deployment, rather than leaving them as unrelated containers.
Two containers, two independent servers
Server A runs Web A, and Server B runs Web B. Docker starts both containers, but it doesn't track whether this two-server app still has two healthy instances.
Declare two replicas
You declare two replicas, and the Kubernetes controller keeps comparing that desired count with the Pods that are actually running. Here, Pod A and Pod B sit on separate nodes by assumption; Kubernetes doesn’t guarantee that placement automatically.
A failed server leaves one replica
When Node A fails, only Pod B remains, leaving one working replica. The Controller schedules a New Pod on available Node C, restoring the declared count of two.
Node A fails, leaving one working web app Pod. What does Kubernetes try to do?
Let's think this through. Node A fails, leaving one working web app Pod. What does Kubernetes try to do? A: Start a replacement Pod on an available node. B: Wait for someone to restart Node A. C: Send all requests to the failed Pod. Choose an answer, or just think it through. I'll explain in a moment.
- Start a replacement Pod on an available node
- Wait for someone to restart Node A
- Send all requests to the failed Pod
Node A fails, leaving one working web app Pod. What does Kubernetes try to do?
The answer is A: Start a replacement Pod on an available node. The app's desired count is two replicas, but only one remains. Kubernetes tries to schedule a replacement on a node with capacity; it does not need the failed server to recover first.
- Start a replacement Pod on an available node
- Wait for someone to restart Node A
- Send all requests to the failed Pod
Raise the target to three replicas
Change the desired count to three, and Kubernetes’ Controller works to maintain three Pods, placing Pod C on Node C when capacity allows. You don’t manually start containers server by server; cluster capacity still determines whether that target can be met.
One stable destination for changing Pods
A client requests a page through the external load balancer, which forwards it to the Kubernetes Service. The Service routes to a ready Pod, like Pod B, so clients don’t need to track changing Pod addresses.
Different jobs, working together
Docker handles individual containers; Kubernetes coordinates a declared application state across servers. That coordination supports recovery, scaling, and stable routing to ready Pods.
- Docker runs individual containers
- Kubernetes maintains replicas across servers
- Services route to ready Pods





