exam questions

Exam Professional Cloud DevOps Engineer All Questions

View all questions & answers for the Professional Cloud DevOps Engineer exam

Exam Professional Cloud DevOps Engineer topic 1 question 139 discussion

Actual exam question from Google's Professional Cloud DevOps Engineer
Question #: 139
Topic #: 1
[All Professional Cloud DevOps Engineer Questions]

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?

  • 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.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
cachopo
2 months, 1 week ago
Selected Answer: A
- The --logging=SYSTEM option disables workload logging (application logs) while keeping GKE system logs (like node, control plane, and Kubernetes system logs). - This helps reduce costs by not storing verbose application logs while still collecting critical GKE operational logs for monitoring. - Since developers use kubectl logs, they can still see logs without needing Cloud Logging.
upvoted 1 times
cachopo
2 months, 1 week ago
Why not the other options? B. --logging=WORKLOAD disables system logs but keeps workload logs (application logs). - This increases costs because verbose application logs continue being collected in Cloud Logging. C. - This completely disables all logging, including GKE system logs, which is not recommended because operational logs are needed for debugging and monitoring. D. - This filters logs based on severity but still keeps some workload logs, not fully disabling application logging. - Also, not all logs use severity labels, so some logs may still be ingested, leading to unnecessary costs.
upvoted 1 times
cachopo
2 months, 1 week ago
By choosing A, you ensure that GKE system logs are collected while stopping application logs from being stored, minimizing logging costs without impacting developers' ability to use kubectl logs
upvoted 1 times
...
...
...
SahandJ
10 months, 3 weeks ago
Selected Answer: B
Not sure I agree with any answers. But I disagree the least with A. A) Would send all the logs, including memory, CPU, and other system information. This is too verbose. B) WORKLOAD logs should be sufficient I believe C) Not sure disabling _Default helps here D) An exclusion filter of "severity >= DEBUG..." would literally exclude *all* logs?
upvoted 1 times
SahandJ
10 months, 2 weeks ago
I just realised I completely misunderstood the question. For some reason I had the notion in my head that the Developers were to migrate to Cloud Logging as well and that not only do we need to minimize cost, but also remove redundant logs (like system logs) in Cloud Logging. However, obviously, the only requirement is to minimize costs for cloud logging. The devs are already reading the logs directly using kubectl. As such we want to remove as much logging as possible from the _Default bucket. Therefore (D) is the correct answer!
upvoted 1 times
...
SahandJ
10 months, 2 weeks ago
I meant to say that I disagree the least with *B* as my selected answer
upvoted 1 times
...
...
asdasdfczxhjkvz
1 year, 1 month ago
Selected Answer: A
A is correct
upvoted 2 times
...
xhilmi
1 year, 4 months ago
Selected Answer: D
To minimize costs associated with application logging in Google Kubernetes Engine (GKE) while still collecting operational logs, the recommended approach is (option D). Add the severity >= DEBUG resource.type = "k8s_container" exclusion filter to the _Default logging sink in the project associated with the development environment. This filter excludes logs with a severity level of DEBUG or lower for the specified resource type, "k8s_container," effectively reducing the volume of verbose application logs being ingested into Cloud Logging. This allows you to focus on collecting GKE operational logs while excluding less critical and potentially costly application logs. It helps strike a balance between maintaining visibility into operational aspects and optimizing costs associated with log storage and processing.
upvoted 1 times
Luu13
1 year ago
If the filter in the exclusion filter is for severity >= DEBUG... would not exclude severity >= DEBUG instead of severity <= DEBUG?
upvoted 1 times
...
...
lelele2023
1 year, 6 months ago
Selected Answer: D
D The idea is to prevent/minimize container logs from getting sent to the sink,
upvoted 3 times
lelele2023
1 year, 6 months ago
C is invalid since a valid gcloud CLI will be: gcloud logging settings update --folder=FOLDER_ID--disable-default-sink https://cloud.google.com/logging/docs/default-settings#disable-default-sink
upvoted 1 times
...
...
Jason_Cloud_at
1 year, 6 months ago
Selected Answer: D
right answer
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago