Display name
pod/latencies/pod_first_ready
(project)GAUGE
, Double
, s
Created
to Ready
), including image pulls. Sampled every 60 seconds.node/latencies/startup
(project)GAUGE
, INT64
, s
CreationTimestamp
to Kubernetes node ready
for the first time. Sampled every 60 seconds.accelerator_family
: a classification of nodes based on hardware accelerators: gpu
, tpu
, cpu
. kube_control_plane_available
: whether the node creation request was received when KCP (kube control plane) was available. autoscaler/latencies/per_hpa_recommendation_scale_latency_seconds
(project)GAUGE
, DOUBLE
, s
metric_type
: the type of metric source. It should be one of "ContainerResource"
, "External"
, "Object"
, "Pods"
or "Resource"
. The Startup Latency dashboard for workloads is only available for Deployments. To view startup latency metrics for Deployments, perform the following steps in the Google Cloud console:
Go to the Workloads page.
To open the Deployment details view, click the name of the workload that you want to inspect.
Click the Observability tab.
Select Startup Latency from the menu on the left.
The startup latency of Pods refers to the total startup latency, including image pulls, which measures the time from the Created
status of the Pod until the Ready
status. You can assess the startup latency of Pods by using the following two charts:
Pod Startup Latency Distribution chart: this chart shows the startup latency percentiles of Pods (fiftieth percentile, ninety-fifth percentile, and ninety-ninth percentile) that are calculated based on the observations of Pod startup events over fixed 3-hour time intervals, for example, 12:00 AM-3:00 AM and 3:00 AM-6:00 AM. You can use this chart for the following purposes:
Pod Startup Count chart: this chart shows the count of Pods that were started during the selected time intervals. You can use this chart for the following purposes:
You can view the startup latency of individual Pods on the Pod First Ready Latency timeline chart and the associated list.
You can find out when an individual Pod was created by looking at the value in the timestamp
field in a corresponding Pod creation event. To see the timestamp
field, run the following query in Logs Explorer:
log_id("cloudaudit.googleapis.com/activity")AND protoPayload.methodName="io.k8s.core.v1.pods.create"AND resource.labels.project_id=PROJECT_IDAND resource.labels.cluster_name=CLUSTER_NAMEAND resource.labels.location=CLUSTER_LOCATIONAND protoPayload.response.metadata.namespace=NAMESPACEAND protoPayload.response.metadata.name=POD_NAME
To list all Pod creation events for your workload, use the following filter in the preceding query: protoPayload.response.metadata.name=~"POD_NAME_PREFIX-[a-f0-9]{7,10}-[a-z0-9]{5}"
When you compare the latencies of individual Pods, you can test the impact of various configurations on Pod startup latency and identify an optimal configuration based on your requirements.
Pod scheduling latency is the amount of time between when a Pod was created and when the Pod was scheduled on a node. Pod scheduling latency contributes to a Pod's end-to-end startup time, and is calculated by subtracting the timestamps of a Pod scheduling event and a Pod creation request.
You can find a timestamp of an individual Pod scheduling event from the jsonPayload.eventTime
field in a corresponding Pod scheduling event. To see the jsonPayload.eventTime
field, run the following query in Logs Explorer:
log_id("events")jsonPayload.reason="Scheduled"resource.type="k8s_pod"resource.labels.project_id=PROJECT_IDresource.labels.location=CLUSTER_LOCATIONresource.labels.cluster_name=CLUSTER_NAMEresource.labels.namespace_name=NAMESPACEresource.labels.pod_name=POD_NAME
To list all Pod scheduling events for your workload, use the following filter in the preceding query: resource.labels.pod_name=~"POD_NAME_PREFIX-[a-f0-9]{7,10}-[a-z0-9]{5}"
Container image pull latency contributes to Pod startup latency in scenarios when the image is not yet available on the node or the image needs to be refreshed. When you optimize image pull latency, you reduce your workload startup latency during cluster scale-out events.
You can view the Kubelet Image Pull Events table to see when the workload container images were pulled and how long the process took.
The image pull latency is available in the jsonPayload.message
field, which contains a message like the following:
"Successfully pulled image "gcr.io/example-project/image-name" in 17.093s (33.051s including waiting). Image size: 206980012 bytes."
The latency of Horizontal Pod Autoscaler (HPA) scaling recommendations for the HPA target is the amount of time between when the metrics are created and when the corresponding scaling recommendation is applied to the API server. When you optimize HPA scaling recommendation latency, you reduce your workload startup latency during scale-out events.
HPA scaling can be viewed on the following two charts:
HPA Scaling Recommendation Latency Distribution chart: this chart shows the percentiles of HPA scaling recommendation latency (fiftieth percentile, ninety-fifth percentile, and ninety-ninth percentile) that are calculated based on the observations of HPA scaling recommendations over trailing 3-hour time intervals. You can use this chart for the following purposes:
HPA Scaling Recommendation Count chart: this chart shows the count of HPA scaling recommendations that were observed during the selected time interval. Use the chart for the following tasks:
Pod scheduling issues might impact the end-to-end startup latency of your workload. To reduce the end-to-end startup latency of your workload, troubleshoot and reduce the number of these issues.
The following are the two charts available for tracking such issues:
To view startup latency metrics for nodes, perform the following steps in the Google Cloud console:
Go to the Kubernetes Clusters page.
To open the Cluster details view, click the name of the cluster that you want to inspect.
Click the Observability tab.
From the menu on the left, select Startup Latency.
The startup latency of a node refers to the total startup latency, which measures the time from the CreationTimestamp
of the node until the Kubernetes node ready
status. Node startup latency can be viewed on the following two charts:
Node Startup Latency Distribution chart: this chart shows the percentiles of node startup latency (fiftieth percentile, ninety-fifth percentile, and ninety-ninth percentile) that are calculated based on the observations of node startup events over fixed 3-hour time intervals, for example, 12:00 AM-3:00 AM and 3:00 AM-6:00 AM. You can use this chart for the following purposes:
Node Startup Count chart: this chart shows the count of nodes started during the selected time intervals. You can use the chart for the following purposes:
When you compare the latencies of individual nodes, you can test the impact of various node configurations on the node startup latency and identify an optimal configuration based on your requirements. You can view the startup latency of individual nodes on the Node Startup Latency timeline chart and the associated list.
Use the Node Startup Latency timeline chart to correlate individual node starts with recent events, such as Cluster Updates or Node Pool Updates. You can determine potential causes for changes in startup latency compared to other nodes. You can select the events in the Annotations list at the top of the dashboard.
Use the Node Startup Latency list to identify individual nodes that took the most or the least time to start. You can sort the list by the Latency column. When you identify nodes with the highest startup latency, you can troubleshoot latency degradation by correlating node start events with other recent events.
You can find out when an individual node was created by looking at the value of the protoPayload.metadata.creationTimestamp
field in a corresponding node creation event. To see the protoPayload.metadata.creationTimestamp
field, run the following query in Logs Explorer:
log_id("cloudaudit.googleapis.com/activity")AND protoPayload.methodName="io.k8s.core.v1.nodes.create"AND resource.labels.project_id=PROJECT_IDAND resource.labels.cluster_name=CLUSTER_NAMEAND resource.labels.location=CLUSTER_LOCATIONAND protoPayload.response.metadata.name=NODE_NAME
If your node pools have different configurations, for example, to run different workloads, you might need to monitor node startup latency separately by node pools. When you compare node startup latencies across your node pools, you can get insights into how node configuration impacts node startup latency and consequently optimize latency.
By default, the Node Startup Latency dashboard shows the aggregated Startup Latency Distribution and individual Node Startup Latencies across all node pools in a cluster. To view node startup latency for a specific node pool, select the name of the node pool by using the $node_pool_name_var
filter located at the top of the dashboard.
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-04-17 UTC.