nerdexam
Google

PROFESSIONAL-CLOUD-DEVOPS-ENGINEER · Question #92

Your company runs services by using Google Kubernetes Engine (GKE). The GKE dusters in the development environment run applications with verbose logging enabled. Developers view logs by using the kube

The correct answer is D. Add the severity >= DEBUG resource.type = "k8s_container" exclusion filter to the _Default. To minimize GKE application logging costs while collecting operational logs, add an exclusion filter to the _Default sink that specifically drops verbose container logs at DEBUG severity.

Submitted by yuki_2020· Apr 18, 2026Implementing and managing cost controls

Question

Your company runs services by using Google Kubernetes Engine (GKE). The GKE dusters in the development environment run applications with verbose logging enabled. Developers view logs by using the kubectl logs command and do not use Cloud Logging. Applications do not have a uniform logging structure defined. You need to minimize the costs associated with application logging while still collecting GKE operational logs. What should you do?

Options

  • ARun the gcloud container clusters update --logging=SYSTEM command for the development
  • BRun the gcloud container clusters update --logging=WORKLOAD command for the development
  • CRun the gcloud logging sinks update _Default --disabled command in the project associated with
  • DAdd the severity >= DEBUG resource.type = "k8s_container" exclusion filter to the _Default

How the community answered

(34 responses)
  • A
    3% (1)
  • B
    12% (4)
  • C
    18% (6)
  • D
    68% (23)

Why each option

To minimize GKE application logging costs while collecting operational logs, add an exclusion filter to the _Default sink that specifically drops verbose container logs at DEBUG severity.

ARun the gcloud container clusters update --logging=SYSTEM command for the development

Running `gcloud container clusters update --logging=SYSTEM` configures the cluster to send only system logs, excluding *all* application logs, which might be too aggressive if some application logs of higher severity are still desired.

BRun the gcloud container clusters update --logging=WORKLOAD command for the development

Running `gcloud container clusters update --logging=WORKLOAD` configures the cluster to send workload (application) logs to Cloud Logging, which would *increase* logging costs due to verbose logging, directly contradicting the goal of minimizing costs.

CRun the gcloud logging sinks update _Default --disabled command in the project associated with

Running `gcloud logging sinks update _Default --disabled` would disable the *entire* `_Default` sink, meaning no logs whatsoever, including critical GKE operational logs, would be sent to Cloud Logging, violating the requirement to 'still collect GKE operational logs.'

DAdd the severity >= DEBUG resource.type = "k8s_container" exclusion filter to the _DefaultCorrect

Adding an exclusion filter like `severity >= DEBUG resource.type = "k8s_container"` to the `_Default` sink allows you to discard verbose, high-volume application logs (often at DEBUG level from Kubernetes containers) from being ingested into Cloud Logging. This significantly reduces logging costs while ensuring that essential GKE operational logs (which are typically not at DEBUG level or not from `k8s_container` resource type) are still collected and retained.

Concept tested: Cloud Logging exclusion filters for cost control

Source: https://cloud.google.com/logging/docs/routing/exclusions

Topics

#GKE Logging#Cloud Logging#Cost Optimization#Log Exclusion Filters

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVOPS-ENGINEER Practice