KCNA · Question #59
Which of these events will cause the kube-scheduler to assign a Pod to a node?
The correct answer is D. When a new Pod is created and has no assigned node. The kube-scheduler assigns a Pod to a suitable node when a new Pod is created without a predefined node, initiating the Pod's lifecycle on the cluster.
Question
Which of these events will cause the kube-scheduler to assign a Pod to a node?
Options
- AWhen the Pod crashes because of an error.
- BWhen a new node is added to the Kubernetes cluster.
- CWhen the CPU load on the node becomes too high.
- DWhen a new Pod is created and has no assigned node.
How the community answered
(32 responses)- B3% (1)
- C3% (1)
- D94% (30)
Why each option
The kube-scheduler assigns a Pod to a suitable node when a new Pod is created without a predefined node, initiating the Pod's lifecycle on the cluster.
If a Pod crashes, the kubelet or a controller typically handles restarts or replacements, but the kube-scheduler is only involved if a *new* Pod needs to be scheduled.
When a new node is added, the kube-scheduler does not automatically re-assign existing Pods; it makes that node available for *new* Pods to be scheduled.
High CPU load on a node typically does not trigger the kube-scheduler to re-assign *running* Pods; existing Pods will continue, potentially with performance issues, unless other autoscaling or rescheduling mechanisms are in place.
The kube-scheduler is responsible for watching for newly created Pods that have no node assigned. When it finds such a Pod, it selects the best node for it to run on, considering various factors like resource requirements, policies, and affinity/anti-affinity rules.
Concept tested: Kube-scheduler function
Source: https://kubernetes.io/docs/concepts/overview/components/#kube-scheduler
Topics
Community Discussion
No community discussion yet for this question.