Kubernetes
Hard
Concepts
A pod was scheduled using a requiredDuringSchedulingIgnoredDuringExecution node affinity rule. Later someone removes the matching label from the node. What happens to the pod?
Select your answer:
Show answer and explanation
Answer: It keeps running on that node
Explanation
The IgnoredDuringExecution part of the name means the rule is only checked when the pod is scheduled. Changing node labels afterwards doesn't affect pods already running there. To move pods off a node, add a NoExecute taint or drain the node.
More hard Kubernetes questions
- A node gets a NoExecute taint. A pod already running on it tolerates the taint with tolerationSeconds: 300. What happens?
- What does a DNS lookup of a headless Service (clusterIP: None) with a selector return?
- What does externalTrafficPolicy: Local do on a NodePort or LoadBalancer Service?
- In a NetworkPolicy ingress rule, what is the difference between putting namespaceSelector and podSelector in the same 'from' entry and putting them in two separate entries?
- Two controllers read the same Deployment and both send an update based on what they read. How does the API server stop the second update from silently overwriting the first?
- A namespace has been stuck in Terminating for hours. What is the most likely cause?