Stay organized with collections Save and categorize content based on your preferences.
This page shows how to configure Google Kubernetes Engine (GKE) clusters with GKE Dataplane V2 observability, starting in GKE versions 1.28 or later. For more information on the benefits and requirements of GKE Dataplane V2 observability, see About GKE Dataplane V2 observability.
Note: You can enable GKE Dataplane V2 metrics and GKE Dataplane V2 observability tools independent of each other. 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 metrics, you must configure GKE Dataplane V2 metrics. You can configure GKE Dataplane V2 metrics when you create a cluster or update a cluster running with GKE Dataplane V2. You can enable or disable GKE Dataplane V2 metrics using the gcloud CLI.
We recommend enabling GKE Dataplane V2 metrics and Google Cloud Managed Service for Prometheus on your GKE cluster. Once both are enabled, GKE Dataplane V2 metrics are sent to Google Cloud Managed Service for Prometheus.
Create an Autopilot cluster with GKE Dataplane V2 metrics enabledWhen you create new GKE Autopilot clusters, GKE enables GKE Dataplane V2 metrics by default on the cluster without requiring a specific flag.
To use the GKE Autopilot cluster GKE Dataplane V2 metrics with Google Cloud Managed Service for Prometheus, configure the ClusterPodMonitoring
resource to scrape the metrics and send them to Google Cloud Managed Service for Prometheus.
Create a ClusterPodMonitoring
manifest:
Apply the ClusterPodMonitoring
manifest:
kubectl apply -f ClusterPodMonitoring.yaml
ClusterPodMonitoring
resource, GKE charges an ingestion cost based on the metric volume. Create a Standard cluster with GKE Dataplane V2 metrics enabled
To enable GKE Dataplane V2 metrics, create a cluster with the --enable-dataplane-v2-metrics
flag:
gcloud container clusters create CLUSTER_NAME \
--enable-dataplane-v2 \
--enable-ip-alias \
--enable-managed-prometheus \
--enable-dataplane-v2-metrics
Replace the following:
CLUSTER_NAME
: the name of your cluster.The --enable-managed-prometheus
flag instructs GKE to use the metrics with Google Cloud Managed Service for Prometheus.
To enable GKE Dataplane V2 metrics on an existing cluster, run the following command:
gcloud container clusters update CLUSTER_NAME \
--enable-dataplane-v2-metrics
Replace CLUSTER_NAME
with the name of your cluster.
To disable GKE Dataplane V2 metrics:
gcloud container clusters update CLUSTER_NAME \
--disable-dataplane-v2-metrics
Replace CLUSTER_NAME
with the name of your cluster.
You can use a private endpoint to access the GKE Dataplane V2 observability troubleshooting tools. To enable GKE Dataplane V2 observability tools, you must have a cluster configured with GKE Dataplane V2. You can enable GKE Dataplane V2 observability tools on a new cluster or an existing cluster.
Create an Autopilot cluster with observability enabledTo create a GKE Autopilot cluster with GKE Dataplane V2 observability enabled:
gcloud container clusters create-auto CLUSTER_NAME \
--enable-dataplane-v2-flow-observability \
--location COMPUTE_LOCATION
Replace the following: * CLUSTER_NAME
: the name of your cluster. * COMPUTE_LOCATION
: the Compute Engine location for the cluster.
To create a GKE Standard cluster with GKE Dataplane V2 observability enabled:
gcloud container clusters create CLUSTER_NAME \
--enable-dataplane-v2 \
--enable-ip-alias \
--enable-dataplane-v2-flow-observability \
--location COMPUTE_LOCATION
Replace the following: * CLUSTER_NAME
: the name of your cluster. * COMPUTE_LOCATION
: the Compute Engine location for the cluster.
To enable GKE Dataplane V2 observability on an existing cluster, run the following command:
gcloud container clusters update CLUSTER_NAME \
--enable-dataplane-v2-flow-observability \
--location COMPUTE_LOCATION
Replace the following:
CLUSTER_NAME
: the name of your cluster.COMPUTE_LOCATION
: the Compute Engine location for the cluster.To disable GKE Dataplane V2 observability tools on an existing cluster, run the following command:
gcloud container clusters update CLUSTER_NAME \
--disable-dataplane-v2-flow-observability
Replace CLUSTER_NAME
with the name of your cluster.
Use the Hubble CLI tool on the cluster after you enable the GKE Dataplane V2 observability feature.
Define alias for hubble-cli
binary:
alias hubble="kubectl exec -it -n gke-managed-dpv2-observability deployment/hubble-relay -c hubble-cli -- hubble"
To check the Hubble status, with the GKE Dataplane V2 observability feature enabled, use the Hubble CLI in all Autopilot clusters:
hubble status
To view current traffic, use the Hubble CLI as follows:
hubble observe
After GKE Dataplane V2 observability is enabled, you can deploy the open source Hubble UI.
Enable observability in your GKE cluster:
Create a GKE cluster with observability enabled:
gcloud container clusters create-auto hubble-rc-auto \
--location COMPUTE_LOCATION \
--cluster-version VERSION \
--enable-dataplane-v2-flow-observability
Replace the following:
VERSION
: the version of your cluster.COMPUTE_LOCATION
: the Compute Engine location for the cluster.Alternatively, enable observability in an existing cluster:
gcloud container clusters update CLUSTER_NAME \
--location COMPUTE_LOCATION \
--enable-dataplane-v2-flow-observability
Replace the following:
CLUSTER_NAME
: the name of your cluster.COMPUTE_LOCATION
: the Compute Engine location for the cluster.Configure kubectl
to connect to the cluster:
gcloud container clusters get-credentials CLUSTER_NAME \
--location COMPUTE_LOCATION
Replace
CLUSTER_NAME
: the name of your cluster.COMPUTE_LOCATION
: the Compute Engine location for the cluster.Deploy Hubble UI:
Apply the hubble-ui-128.yaml
manifest:
kubectl apply -f hubble-ui-128.yaml
Expose Service with port forwarding:
kubectl -n gke-managed-dpv2-observability port-forward service/hubble-ui 16100:80 --address='0.0.0.0'
Access the Hubble UI in your web browser:
Note: If you're usingkubectl
on VM, use http://<VM_IP>:16100/
instead.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-11 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-11 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