Google Professional Cloud DevOps Engineer Question 263
Select 3Google Cloud PlatformYour team is running a Kubernetes-based application on Google Kubernetes Engine (GKE). You notice that some nodes are significantly underutilized, while others are overutilized, leading to increased costs and inconsistent performance. Which of the following actions can help optimize resource utilization and reduce costs?
- A
Enable cluster autoscaling to automatically adjust the number of nodes based on workload demands.
- B
Manually resize the cluster by increasing the number of nodes during peak hours and reducing them during off-peak hours.
- C
Configure resource requests and limits for your Pods to ensure fair allocation of CPU and memory resources.
- D
Switch to preemptible VMs for the cluster nodes to reduce costs while maintaining the same configuration.
- E
Use vertical pod autoscaling to dynamically adjust resource requests for your Pods based on actual usage.
Show answer and explanation
Correct answers: A, C, E
Explanation
Optimizing resource utilization and costs in GKE requires leveraging features like cluster autoscaling to dynamically adjust the number of nodes, configuring resource requests and limits to allocate resources efficiently, and using vertical pod autoscaling to match resource allocation to actual usage patterns. These approaches work together to balance performance and costs effectively.
- A. Correct.
Enabling cluster autoscaling helps automatically scale the number of nodes in your cluster based on the workloads, ensuring optimal resource utilization and cost-efficiency. This is a key feature in GKE for managing dynamic workloads.
- B. Incorrect.
Manually resizing the cluster is prone to human error, is time-consuming, and does not adapt to real-time workload changes, making it less efficient for optimizing resource utilization.
- C. Correct.
Configuring resource requests and limits ensures that Pods get the necessary resources without overprovisioning, leading to better utilization and cost control. It also prevents resource contention issues.
- D. Incorrect.
While preemptible VMs are cost-effective, they are not suitable for all workloads due to their ephemeral nature. They may lead to instability in production workloads running on GKE.
- E. Correct.
Vertical pod autoscaling ensures that Pods are allocated the right amount of resources based on their actual usage, helping to reduce overprovisioning and underutilization.