Logging is disabled on Kubernetes engine clusters Affecting Kubernetes (Container) Engine service in Google


0.0
high
    Severity Framework Snyk CCSS
    Rule category Containers / Audit

Is your enviroment affected by this misconfiguration?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
    Frameworks
    CIS-Controls HIPAA ISO-27001 NIST-800-53 SOC-2
  • Snyk ID SNYK-CC-00414
  • credit Snyk Research Team

Description

Logs are useful for investigating suspicious API requests, for collecting statistics, or for creating monitoring alerts for unwanted API calls.

How to fix?

Ensure logging_service field is set to logging.googleapis.com/kubernetes.

Example Configuration

resource "google_container_cluster" "allowed_stackdriver" {
  name                     = "gke-cluster-414-b"
  location                 = "us-central1-b"
  logging_service          = "logging.googleapis.com/kubernetes"
  project                  = "my-project"
  remove_default_node_pool = true
  initial_node_count       = 1
}