Stay organized with collections Save and categorize content based on your preferences.
This page describes how to configure a Google Kubernetes Engine (GKE) cluster to send a curated set of cAdvisor/Kubelet metrics to Cloud Monitoring using Google Cloud Managed Service for Prometheus. This page also describes how these metrics are formatted when they are written to Monitoring, and how to query metrics.
The curated set of metrics is a subset of the set of cAdvisor/Kubelet metrics built into every Kubernetes deployment by default and includes metrics related to reducing ingestion volume and associated costs.
Before you beginBefore you start, make sure that you have performed the following tasks:
gcloud components update
. Note: For existing gcloud CLI installations, make sure to set the compute/region
property. If you use primarily zonal clusters, set the compute/zone
instead. By setting a default location, you can avoid errors in the gcloud CLI like the following: One of [--zone, --region] must be supplied: Please specify location
. You might need to specify the location in certain commands if the location of your cluster differs from the default that you set.To collect cAdvisor/Kubelet metrics, your GKE cluster must meet the following requirements:
You can enable cAdvisor/Kubelet metrics in an existing GKE cluster using the Google Cloud console, the gcloud CLI, or Terraform.
ConsoleTo configure cAdvisor/Kubelet metrics from the Details tab for the cluster, do the following:
In the Google Cloud console, go to the Kubernetes clusters page:
If you use the search bar to find this page, then select the result whose subheading is Kubernetes Engine.
Click your cluster's name.
In the Features row labelled Cloud Monitoring, click the Edit icon.
In the Edit Cloud Monitoring dialog that appears, confirm that Enable Cloud Monitoring is selected.
In the Components drop-down menu, select the cAdvisor/Kubelet components from which you would like to collect metrics:
Click OK.
Click Save Changes.
Update your cluster to collect metrics:
gcloud container clusters update CLUSTER_NAME \
--location=COMPUTE_LOCATION \
--enable-managed-prometheus \
--monitoring=SYSTEM,CADVISOR,KUBELET
Replace the following:
CLUSTER_NAME
: the name of the existing cluster.COMPUTE_LOCATION
: the Compute Engine location of the cluster.The set of values supplied to the monitoring
flag overrides any previous setting.
To configure the collection of cAdvisor/Kubelet metrics by using Terraform, see the monitoring_config
block in the Terraform registry for google_container_cluster
. For general information about using Google Cloud with Terraform, see Terraform with Google Cloud.
All Kubernetes cAdvisor/Kubelet metrics written to Cloud Monitoring use the resource type prometheus_target
. Each metric name is prefixed with prometheus.googleapis.com/
and has a suffix indicating the Prometheus metric type, such as /gauge
, /histogram
, or /counter
. Otherwise, each metric name is identical to the metric name exposed by open source Kubernetes.
The cAdvisor/Kubelet metrics can be exported from Cloud Monitoring by using the Cloud Monitoring API. Because all cAdvisor/Kubelet metrics are ingested by using Google Cloud Managed Service for Prometheus, cAdvisor/Kubelet metrics can be queried by using Prometheus Query Language (PromQL). They can also be queried by using by using Monitoring Query Language (MQL).
Querying metricsWhen you query cAdvisor/Kubelet metrics, the name you use depends on whether you are using PromQL or Cloud Monitoring-based features like MQL or the Metrics Explorer menu-driven interface.
The following tables of cAdvisor/Kubelet metrics show two versions of each metric name:
prometheus.googleapis.com/
, which has been omitted from the entries in the table.The Cloud Monitoring metric names in this table must be prefixed with prometheus.googleapis.com/
. That prefix has been omitted from the entries in the table.
container_cpu_cfs_periods_total
container_cpu_cfs_periods_total/counter
CUMULATIVE
, DOUBLE
, 1
cpu
container_cpu_cfs_throttled_periods_total
container_cpu_cfs_throttled_periods_total/counter
CUMULATIVE
, DOUBLE
, 1
cpu
container_cpu_usage_seconds_total
container_cpu_usage_seconds_total/counter
CUMULATIVE
, DOUBLE
, s
cpu
container_fs_limit_bytes
container_fs_limit_bytes/gauge
GAUGE
, DOUBLE
, By
disk
container_fs_read_seconds_total
container_fs_read_seconds_total/counter
CUMULATIVE
, DOUBLE
, 1
diskIO
container_fs_reads_bytes_total
container_fs_reads_bytes_total/counter
CUMULATIVE
, DOUBLE
, By
diskIO
container_fs_reads_total
container_fs_reads_total/counter
CUMULATIVE
, DOUBLE
, 1
diskIO
container_fs_usage_bytes
container_fs_usage_bytes/gauge
GAUGE
, DOUBLE
, By
disk
container_fs_write_seconds_total
container_fs_write_seconds_total/counter
CUMULATIVE
, DOUBLE
, s
diskIO
container_fs_writes_bytes_total
container_fs_writes_bytes_total/counter
CUMULATIVE
, DOUBLE
, By
diskIO
container_fs_writes_total
container_fs_writes_total/counter
CUMULATIVE
, DOUBLE
, 1
diskIO
container_memory_rss
container_memory_rss/gauge
GAUGE
, DOUBLE
, By
memory
container_memory_working_set_bytes
container_memory_working_set_bytes/gauge
GAUGE
, DOUBLE
, By
memory
container_network_receive_bytes_total
container_network_receive_bytes_total/counter
CUMULATIVE
, DOUBLE
, By
network
container_network_receive_packets_dropped_total
container_network_receive_packets_dropped_total/counter
CUMULATIVE
, DOUBLE
, 1
network
container_network_receive_packets_total
container_network_receive_packets_total/counter
CUMULATIVE
, DOUBLE
, 1
network
container_network_transmit_bytes_total
container_network_transmit_bytes_total/counter
CUMULATIVE
, DOUBLE
, By
network
container_network_transmit_packets_dropped_total
container_network_transmit_packets_dropped_total/counter
CUMULATIVE
, DOUBLE
, 1
network
container_network_transmit_packets_total
container_network_transmit_packets_total/counter
CUMULATIVE
, DOUBLE
, 1
network
The Cloud Monitoring metric names in this table must be prefixed with prometheus.googleapis.com/
. That prefix has been omitted from the entries in the table.
kubelet_certificate_manager_server_ttl_seconds
kubelet_certificate_manager_server_ttl_seconds/gauge
GAUGE
, DOUBLE
, 1
kubelet_node_name
kubelet_node_name/gauge
GAUGE
, DOUBLE
, 1
node
kubelet_pleg_relist_duration_seconds
kubelet_pleg_relist_duration_seconds/histogram
CUMULATIVE
, DISTRIBUTION
, s
kubelet_pod_worker_duration_seconds
kubelet_pod_worker_duration_seconds/histogram
CUMULATIVE
, DISTRIBUTION
, s
operation_type
kubelet_running_containers
kubelet_running_containers/gauge
GAUGE
, DOUBLE
, 1
container_state
kubelet_running_pods
kubelet_running_pods/gauge
GAUGE
, DOUBLE
, 1
kubelet_runtime_operations_total
kubelet_runtime_operations_total/counter
CUMULATIVE
, DOUBLE
, 1
operation_type
kubelet_volume_stats_available_bytes
kubelet_volume_stats_available_bytes/gauge
GAUGE
, DOUBLE
, 1
namespace
persistentvolumeclaim
kubelet_volume_stats_capacity_bytes
kubelet_volume_stats_capacity_bytes/gauge
GAUGE
, DOUBLE
, 1
namespace
persistentvolumeclaim
kubelet_volume_stats_inodes
kubelet_volume_stats_inodes/gauge
GAUGE
, DOUBLE
, 1
namespace
persistentvolumeclaim
kubelet_volume_stats_inodes_free
kubelet_volume_stats_inodes_free/gauge
GAUGE
, DOUBLE
, 1
namespace
persistentvolumeclaim
kubelet_volume_stats_inodes_used
kubelet_volume_stats_inodes_used/gauge
GAUGE
, DOUBLE
, 1
namespace
persistentvolumeclaim
kubelet_volume_stats_used_bytes
kubelet_volume_stats_used_bytes/gauge
GAUGE
, DOUBLE
, 1
namespace
persistentvolumeclaim
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-12 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-12 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4