2V0-71.23 Question 15
Single answerYou are managing a Kubernetes cluster in a VMware Tanzu environment. An application team requests that their workloads always run on a specific group of nodes in the cluster. Which logical Kubernetes object should you use to ensure their workloads are scheduled only on the desired nodes?
- A
Namespace
- B
Node Selector
- C
ConfigMap
- D
Pod Disruption Budget
Show answer and explanation
Correct answer: B
Explanation
Node Selector is the correct logical Kubernetes object to ensure that workloads are scheduled only on specific nodes. By applying labels to nodes and configuring a Node Selector in the pod specification, you can constrain the scheduler to place pods on nodes that match the specified labels. This mechanism is ideal for workloads that require specific hardware, isolation, or node-level configurations.
- A. Incorrect.
Namespaces are used to logically separate and group Kubernetes resources like pods, services, and deployments. They do not control node scheduling.
- B. Correct.
Node Selector is a Kubernetes object that ensures pods are scheduled on specific nodes that match the labels specified in the selector.
- C. Incorrect.
ConfigMaps are used to store configuration data as key-value pairs for applications. They do not influence node scheduling.
- D. Incorrect.
Pod Disruption Budgets are used to specify the minimum number of pods that must remain available during maintenance or disruptions. They do not control where pods are scheduled.