Prepare and test your skills
Prepare and test your skills
Free sample question, answered and explained below. The Professional Cloud DevOps Engineer practice bank has 1,455 more like it. Try 10 free: instant score, no account.
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?
ServiceMonitor is a custom resource belonging to the open-source CoreOS prometheus-operator ecosystem, while the rule-evaluator in GMP is a deployment responsible for executing PromQL recording rules and alert evaluations against metrics already stored in Monarch.
PodMonitoring and ClusterPodMonitoring rather than ServiceMonitor resources.rule-evaluator evaluates rules after metrics are ingested. It cannot filter or prevent high-cardinality raw metrics from being ingested into Cloud Monitoring, so it does not reduce ingestion costs.rule-evaluator does not participate in node-level target discovery or pre-ingestion scraping.You were building Prometheus recording rules to pre-aggregate high-cardinality series or defining threshold alerts across global metric streams.
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.
The OperatorConfig resource in the gmp-public namespace is used to supply global operational settings to the Managed Service for Prometheus operator, such as explicit service account credentials for non-GKE clusters or global collection features.
OperatorConfig does not define workload-specific pod label selectors, endpoint ports, or scrape paths (/metrics).PodMonitoring or ClusterPodMonitoring custom resources, not within OperatorConfig.You were configuring explicit Google Cloud IAM service account keys on an on-premises or non-GKE Kubernetes cluster to grant the managed collector permissions to write to the Cloud Monitoring API.
A PodMonitoring resource is a namespaced custom resource used by Google Cloud Managed Service for Prometheus to define scrape targets and ingestion rules strictly within the specific Kubernetes namespace where the resource is created.
PodMonitoring resource cannot discover or scrape pods in namespaces other than its own. Deploying it in gmp-system limits target discovery exclusively to the gmp-system namespace, leaving all tenant workloads unmonitored.gmp-system namespace is reserved for system components managed by the GMP operator, and user-defined workloads should not be placed there.The workload was isolated to a single namespace or if organizational policy prohibited the use of cluster-scoped resources (ClusterPodMonitoring) in favor of decentralized, tenant-managed configurations.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated