Professional Cloud DevOps Engineer
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
An enterprise runs a multi-tenant Google Kubernetes Engine (GKE) cluster where microservices belonging to a core payment platform are distributed across dozens of distinct tenant namespaces. All pods expose Prometheus metrics on the HTTP path /metrics. Due to high-cardinality debug metrics prefixed with payment_debug_, Cloud Monitoring ingestion costs have increased significantly. Managed collection for Google Cloud Managed Service for Prometheus (GMP) is active on the cluster.
You need to implement a centralized collection configuration that discovers and scrapes these payment pods across all namespaces while discarding the payment_debug_ metrics prior to ingestion into Cloud Monitoring.
What should you do?
ClusterPodMonitoring is a non-namespaced Kubernetes custom resource provided by Google Cloud Managed Service for Prometheus (GMP). It allows administrators to define target discovery and metric scraping specifications that apply globally across all namespaces in a cluster. The metricRelabeling configuration within the custom resource uses standard Prometheus metric relabeling rules to modify, drop, or keep specific time series before they are exported to the central Monarch storage backend.
ClusterPodMonitoring, the managed collector discovers matching pods across all existing and future tenant namespaces without requiring separate scraping manifests in each individual namespace.metricRelabeling entry with action: drop and a regex targeting payment_debug_.+ on __name__ strips out unneeded high-cardinality metrics directly at the node collector level, stopping them before ingestion.Alternative approaches like deploying duplicate PodMonitoring objects per namespace increase administrative overhead, while configuring drop filters in alert evaluators still incurs data ingestion costs. ClusterPodMonitoring with local metricRelabeling delivers the lowest operational friction and maximum cost efficiency.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.