Description
On a GKE Standard cluster, use monitoring_service = "monitoring.googleapis.com/kubernetes" to send metrics to Cloud Monitoring. To choose individual components, use monitoring_config.
Potential impact
If you use none, check whether another monitoring system shows the cluster health and resource usage you need. Missing metrics can delay detection of capacity shortages.
Remediation
Verify collection permissions and find a recent CPU or memory metric for the cluster in Metrics Explorer. Configure any application metrics and alert policies separately, and review the collection scope and cost.
Examples
The examples change only the monitoring service on the same cluster. Supply the network and remaining node settings for your environment.
Before
resource "google_container_cluster" "cluster" {
name = "marcellus-wallace"
location = "us-central1-a"
initial_node_count = 3
monitoring_service = "none"
}
After
resource "google_container_cluster" "cluster" {
name = "marcellus-wallace"
location = "us-central1-a"
initial_node_count = 3
monitoring_service = "monitoring.googleapis.com/kubernetes"
}