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.
Question
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)- A3% (1)
- B12% (4)
- C18% (6)
- D68% (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.
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.
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.
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.'
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
Community Discussion
No community discussion yet for this question.