
Answer-first summary for fast verification
Answer: Run the gcloud container clusters update --logging=SYSTEM command for the development cluster.
To minimize the costs associated with application logging while still collecting GKE operational logs, the best approach is to disable workload logging for the development cluster. This is because the developers are not using Cloud Logging and the applications do not have a uniform logging structure, which means the verbose logging is not being utilized effectively and is incurring unnecessary costs. Option A suggests updating the cluster to only log system logs, which are the operational logs of GKE, and not the workload logs, which are the application logs. This aligns with the requirement to minimize costs while still collecting GKE operational logs. Option B would enable workload logging, which is the opposite of what is needed. Option C would disable all logging, including operational logs, which does not meet the requirement. Option D would exclude debug logs from the default sink, but it does not address the root cause of the cost issue, which is the verbose logging of unstructured application logs. Therefore, the correct answer is A.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Your company uses Google Kubernetes Engine (GKE) to run services. In the development environment, GKE clusters run applications with verbose logging enabled. Developers access logs using the kubectl logs command and do not utilize Cloud Logging. The applications lack a standardized logging structure. How can you reduce logging costs while still collecting GKE operational logs?
A
Run the gcloud container clusters update --logging=SYSTEM command for the development cluster.
B
Run the gcloud container clusters update --logging=WORKLOAD command for the development cluster.
C
Run the gcloud logging sinks update _Default --disabled command in the project associated with the development environment.
D
Add the severity >= DEBUG resource.type = "k8s_container" exclusion filter to the _Default logging sink in the project associated with the development environment.
No comments yet.