Other Articles

GKE Cluster – Enable Cluster Logging

Secure Configuration Checks > GCP

This check ensures that GKE clusters send system component, workload and API server logs to Cloud Logging. These logs show what runs in the cluster and who changes it.

Check Details

  • Resource: GKE Cluster
  • Check: Enable cluster logging
  • Risk: Without these logs, attacks and faults can go unseen. There is also no record to use in an investigation.

Remediation via Google Cloud Console

  1. Log in to the Google Cloud Console and navigate to Kubernetes Engine > Clusters. GKE Clusters
  2. Click the affected GKE cluster.
  3. Open the Details tab and locate the Features section. Find Logging and click Edit Logging. GKE Cluster Logging Edit
  4. Under Components, select:
    • System
    • Workloads
    • API server
    GKE Logging Components
  5. Click OK and then click Save Changes to apply the configuration.

Note: System logging is required for GKE log collection. Workload and API server logging are optional components that you can enable according to your monitoring requirements. Enabling or changing control-plane component logging restarts the control plane. During this restart, zonal Standard clusters can become temporarily unavailable; regional and Autopilot control planes remain available.

Remediation via Google Cloud CLI

  1. Open the Google Cloud Console and launch Cloud Shell. GCP Cloud Shell
  2. Update the cluster to send system, workload and API server logs to Cloud Logging:

    gcloud container clusters update <CLUSTER_NAME> \
    --location <LOCATION> \
    --logging=SYSTEM,WORKLOAD,API_SERVER
    

    Replace <CLUSTER_NAME> with your cluster name and <LOCATION> with its zone or region. The Cloud Logging API must be enabled in the project.

  3. Verify the logging components:

    gcloud container clusters describe <CLUSTER_NAME> \
    --location <LOCATION> \
    --format="value(loggingConfig.componentConfig.enableComponents)"
    
    Verify GKE logging

Default Value

By default, new GKE clusters send system and workload logs to Cloud Logging. API server logs are not collected unless you add them.

Updated on 09 November, 2026