Google Cloud Associate Cloud Engineer — Question 225
You are running multiple microservices in a Kubernetes Engine cluster. One microservice is rendering images. The microservice responsible for the image rendering requires a large amount of CPU time compared to the memory it requires. The other microservices are workloads that are optimized for n2-standard machine types. You need to optimize your cluster so that all workloads are using resources as efficiently as possible. What should you do?
Answer options
- A. Assign the pods of the image rendering microservice a higher pod priority than the other microservices.
- B. Create a node pool with compute-optimized machine type nodes for the image rendering microservice. Use the node pool with general-purpose machine type nodes for the other microservices.
- C. Use the node pool with general-purpose machine type nodes for the image rendering microservice. Create a node pool with compute-optimized machine type nodes for the other microservices.
- D. Configure the required amount of CPU and memory in the resource requests specification of the image rendering microservice deployment. Keep the resource requests for the other microservices at the default.
Correct answer: B
Explanation
The correct answer is B because the image rendering microservice requires more CPU, and using compute-optimized machine types will allow it to perform more efficiently. In contrast, the other microservices, which are optimized for n2-standard types, will benefit from remaining on general-purpose nodes, ensuring overall resource efficiency. The other options do not allocate resources effectively based on the specific needs of the microservices.