Kubernetes 101 : Why do we use deployments and not just "unmanaged" pods ?
To see which node hosts our pod, we use the below command:
Taking down a node:
We take the node "node-1" offline for maintenance, using the below command, and the pod gets evicted from "node-1":
We will see that our pod doesn't get re-scheduled on any other node. We can verify that using the below command:
Even after making our node "node-1" available again, using the below command, the pod doesn't get re-scheduled:
On the other hand, when we use a deployment to deploy our pod using the below command:
The pod gets re-scheduled on other nodes, when we take the node that is hosting it offline.
Comments