Tencent Cloud TKE log agent is disabled

Configure the agent to collect workload logs.

Description

Collect TKE container logs centrally with the log agent or an existing collector.

Potential impact

Without collection, application logs needed for troubleshooting can disappear after a pod terminates.

Remediation

Set enabled = true in the cluster’s log_agent. Configure collection rules and a destination, then verify that a test container log arrives. Set retention and reader access there.

Examples

The example enables the agent only. Configure the cluster, collection rules, audit logging and event retention separately as needed.

Before

hcl
resource "tencentcloud_kubernetes_cluster" "example" {
  cluster_name        = "test"
  cluster_deploy_type = "MANAGED_CLUSTER"

  log_agent {
    enabled = false
  }
}

After

hcl
resource "tencentcloud_kubernetes_cluster" "example" {
  cluster_name        = "test"
  cluster_deploy_type = "MANAGED_CLUSTER"

  log_agent {
    enabled = true
  }
}

References