Google Professional Cloud DevOps Engineer Question 169
Select 4Google Cloud PlatformYour team is running multiple microservices on Google Kubernetes Engine (GKE) and has noticed a significant increase in monthly costs. After investigating, you find that some workloads are underutilizing resources, while others are over-provisioned. What steps should you take to optimize resource utilization and reduce costs?
- A
Implement horizontal pod autoscaling to dynamically adjust the number of pods based on workload demand.
- B
Set resource requests and limits for CPU and memory to prevent over-provisioning of resources.
- C
Migrate workloads to preemptible VMs to reduce compute costs for non-critical services.
- D
Disable cluster autoscaler to prevent unnecessary scaling of nodes.
- E
Enable node auto-provisioning to optimize node types and sizes based on workload needs.
Show answer and explanation
Correct answers: A, B, C, E
Explanation
To optimize resource utilization and reduce costs in GKE, you should focus on dynamically adjusting resources based on workload demands, preventing over-provisioning, and leveraging cost-effective options like preemptible VMs for suitable workloads. Disabling the cluster autoscaler is counterproductive, as it hinders the ability to scale nodes efficiently.
- A. Correct.
Implementing horizontal pod autoscaling ensures that your workloads scale up or down based on demand, optimizing resource utilization and reducing costs.
- B. Correct.
Setting resource requests and limits for CPU and memory helps prevent over-provisioning and ensures that workloads use only the resources they actually need.
- C. Correct.
Migrating workloads to preemptible VMs is a cost-effective solution for running non-critical or fault-tolerant services at a lower cost.
- D. Incorrect.
Disabling the cluster autoscaler is not recommended as it may prevent the cluster from scaling nodes based on demand, which could lead to resource inefficiencies.
- E. Correct.
Enabling node auto-provisioning allows GKE to automatically choose the most cost-effective and appropriate node types for your workloads, optimizing resource utilization and reducing costs.