Google Associate Cloud Engineer Question 201
Single answerGoogle Cloud PlatformYou are managing a Kubernetes Engine cluster in Google Cloud Platform and need to ensure that certain workloads can only run on nodes with specific hardware configurations. How can you achieve this using node pools?
- A
A. Use node taints and tolerations to ensure workloads are scheduled on the correct nodes.
- B
B. Create separate node pools with specific machine types and use node selectors in your pod specifications.
- C
C. Use Cloud Functions to automatically move workloads to the desired node pool.
- D
D. Configure a regional cluster to automatically distribute workloads across node pools with different configurations.
Show answer and explanation
Correct answer: B
Explanation
To ensure workloads run on nodes with specific hardware configurations, you can create separate node pools with the desired machine types and use node selectors in your pod specifications to target pods to the appropriate nodes. This is a common practice in Kubernetes Engine to manage workloads efficiently based on hardware requirements.
- A. Incorrect.
A. Node taints and tolerations are used to repel workloads from specific nodes, rather than ensuring they run on nodes with specific configurations.
- B. Correct.
B. Creating separate node pools with specific machine types and using node selectors in your pod specifications allows you to target workloads to nodes with specific configurations.
- C. Incorrect.
C. Cloud Functions cannot be used to move workloads between node pools automatically.
- D. Incorrect.
D. Configuring a regional cluster does not affect how workloads are scheduled across node pools; it is for high availability and disaster recovery.