Production must run 24/7; acceptance and development are only critical during office hours. How do you reduce cost for nonproduction environments with minimal operational effort?
Choose an answer
Tap an option to check your answer.
Correct answer: Use Cloud Scheduler to trigger a Cloud Function that will stop the development and acceptance environments after office hours and start them just before office hours..
Why this is the answer
The correct answer is to use Cloud Scheduler to trigger a Cloud Function that stops and starts the non-production environments. This approach directly addresses the requirement for cost reduction by shutting down resources when not needed, and it minimizes operational effort through automation. Cloud Scheduler provides reliable scheduling, and Cloud Functions offer a serverless, scalable way to execute the necessary gcloud commands. The first incorrect option, using a shell script on a production instance, is poor practice because it introduces a dependency on a production resource for non-production automation and lacks robustness. The third incorrect option, using managed instance groups with autoscaling, is designed for scaling based on load, not for scheduled shutdowns, and might not fully stop instances. The fourth incorrect option, using preemptible VMs, is suitable for fault-tolerant, batch-like workloads that can tolerate interruptions, not for environments that need to be consistently available during office hours.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed