Your Kubernetes Pod keeps getting evicted. What do you do?
Alex and Viktor were asked this question in different ways, but the idea is simple—it tests your troubleshooting abilities, particularly in situations where resource limits are not immediately clear. Pod evictions happen when a node is under resource pressure, and the cluster cannot accommodate all running Pods. The interviewer is looking for your understanding of resource management, evictions, and how to respond to such scenarios effectively.
Possible incorrect answer
A typical incorrect response might focus solely on Pod restarts or overlook resource constraints. A candidate might say, “I’d check the Pod logs for errors or redeploy the Pod.” While checking logs can be helpful, redeploying a Pod that has been evicted due to resource constraints doesn’t address the root issue. The Pod will likely keep getting evicted if the underlying resource issue isn’t resolved.