Disabling GKE Container Logs | Efficient Cost Reduction | Exam Preparation

Disabling GKE Container Logs

Question

Your projects incurred more costs than you expected last month.

Your research reveals that a development GKE container emitted a huge number of logs, which resulted in higher costs.

You want to disable the logs quickly using the minimum number of steps.

What should you do?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

A.

The correct answer to this question is A. Go to the Logs ingestion window in Stackdriver Logging, and disable the log source for the GKE container resource.

Explanation: Stackdriver Logging is a Google Cloud service that allows you to store, search, analyze, and alert on logs and events from your infrastructure and applications. It provides a central repository for all the logs generated by various services in your project, including GKE.

When a GKE container emits a large number of logs, it can result in higher costs due to the storage and processing of these logs in Stackdriver Logging. To reduce costs, you need to disable the logs for the container.

The steps to disable the logs for the GKE container resource are:

  1. Go to the Logs ingestion window in Stackdriver Logging: In the Google Cloud Console, select the Stackdriver Logging service from the navigation menu, and then select the Logs ingestion option. This will take you to the Logs ingestion window, where you can manage log sources.

  2. Disable the log source for the GKE container resource: Find the log source for the GKE container resource, and click on the toggle switch to disable it. This will stop the logs from being ingested into Stackdriver Logging.

By following these steps, you can quickly disable the logs for the GKE container resource and reduce your costs. This approach is preferable to the other options because it does not require you to delete and recreate a GKE cluster, which can be time-consuming and disruptive.