Google Associate Cloud Engineer Question 326
Select 2Google Cloud PlatformYou are tasked with setting up Google Cloud Managed Service for Prometheus to monitor your Kubernetes workloads running on GKE. Which steps should you take to successfully deploy and configure Managed Service for Prometheus?
- A
A. Install the Prometheus Operator using Helm on your GKE cluster.
- B
B. Enable the Monitoring API in your Google Cloud project.
- C
C. Use the Cloud Console to create a new Prometheus configuration file.
- D
D. Deploy the GKE workload using the '--enable-managed-prometheus' flag.
- E
E. Configure a Kubernetes PodMonitor resource to specify the metrics to be collected.
Show answer and explanation
Correct answers: B, E
Explanation
To deploy and configure Google Cloud Managed Service for Prometheus, you must ensure that the Monitoring API is enabled in your Google Cloud project to allow the service to collect and manage metrics. Additionally, configuring a PodMonitor resource is essential as it defines the pods and metrics that Prometheus should monitor. These steps are crucial to effectively setting up and utilizing the managed service for monitoring Kubernetes workloads on GKE.
- A. Incorrect.
A. Installing the Prometheus Operator is not necessary for using Google Cloud Managed Service for Prometheus, as it is a fully managed service.
- B. Correct.
B. Enabling the Monitoring API is required to allow Google Cloud to manage and store the metrics collected by Managed Service for Prometheus.
- C. Incorrect.
C. Configuration files for Prometheus are typically managed as Kubernetes resources, not directly via the Cloud Console.
- D. Incorrect.
D. The '--enable-managed-prometheus' flag is not a valid deployment flag for configuring Managed Service for Prometheus.
- E. Correct.
E. A PodMonitor resource in Kubernetes is used to specify which pods to monitor and is essential for configuring Managed Service for Prometheus.