Skip to main content

๐Ÿ›ก๏ธ Google GKE Cluster Logging is not enabled๐ŸŸข

  • Contextual name: ๐Ÿ›ก๏ธ Cluster Logging is not enabled๐ŸŸข
  • ID: /ce/ca/google/gke/cluster-logging
  • Tags:
  • Policy Type: COMPLIANCE_POLICY
  • Policy Categories: SECURITY, RELIABILITY

Logicโ€‹

Descriptionโ€‹

Open File

Descriptionโ€‹

This policy identifies that Cloud Logging is enabled for all Google GKE Clusters.

Rationaleโ€‹

Enabling logging for GKE clusters provides detailed insights into the behavior of the control plane, nodes, and running applications. These logs are essential for troubleshooting issues, monitoring performance, and detecting security incidents.

By default, GKE collects Audit logs, System logs, and Application logs.

Impactโ€‹

GKE logs are exported to Cloud Logging. Enabling logging may incur additional costs associated with Cloud Logging usage.

Auditโ€‹

This policy marks a Google GKE Cluster as INCOMPLIANT if Logging Service is not set to logging.googleapis.com/kubernetes.

Default Valueโ€‹

Logging is enabled by default starting in GKE version 1.14.

Legacy Logging and Monitoring support is enabled by default for earlier versions.

Referencesโ€‹

  1. https://cloud.google.com/stackdriver/docs/solutions/gke/observing
  2. https://cloud.google.com/stackdriver/docs/solutions/gke/managing-logs
  3. https://cloud.google.com/stackdriver/docs/solutions/gke/installing

... see more

Remediationโ€‹

Open File

Remediationโ€‹

To ensure comprehensive logging for troubleshooting, auditing, and security purposes, Cloud Logging should be enabled for GKE clusters.

Enable Cloud Logging on an Existing Clusterโ€‹

From gcloud CLIโ€‹
```sh
gcloud container clusters update {{cluster-name}} \
--location {{location}} \
--logging=SYSTEM,WORKLOAD,API_SERVER
```

policy.yamlโ€‹

Open File

Linked Framework Sectionsโ€‹

SectionSub SectionsInternal RulesPoliciesFlagsCompliance
๐Ÿ’ผ CIS GKE v1.8.0 โ†’ ๐Ÿ’ผ 5.7.1 Ensure Logging and Cloud Monitoring is Enabled (Automated)2no data
๐Ÿ’ผ Cloudaware Framework โ†’ ๐Ÿ’ผ Logging and Monitoring Configuration65no data
๐Ÿ’ผ PCI DSS v3.2.1 โ†’ ๐Ÿ’ผ 10.2.2 All actions taken by any individual with root or administrative privileges.16no data
๐Ÿ’ผ PCI DSS v3.2.1 โ†’ ๐Ÿ’ผ 10.2.7 Creation and deletion of system level objects.12no data
๐Ÿ’ผ PCI DSS v4.0.1 โ†’ ๐Ÿ’ผ 10.2.1.2 Audit logs capture all actions taken by any individual with administrative access, including any interactive use of application or system accounts.16no data
๐Ÿ’ผ PCI DSS v4.0 โ†’ ๐Ÿ’ผ 10.2.1.2 Audit logs capture all actions taken by any individual with administrative access, including any interactive use of application or system accounts.16no data