Skip to main content

GKE Lens

GKE Lens allows you to measure your Google Kubernetes Engine (GKE) clusters cost and usage against best practices and identify areas for improvement.

Required Permission
  • Cloud Analytics

Access GKE Lens dashboard

The GKE Lens dashboard is automatically created once GKE-based workloads are detected in your Google Cloud projects.

To access the GKE Lens dashboard, select Dashboard from the top navigation bar, and then select GKE Lens.

Dashboard navigation bar

Tip

To take full advantage of GKE Lens, enable GKE cost allocation on all the clusters you want to measure. See Understand GKE costs for more information.

Widgets

The GKE Lens dashboard contains widgets that highlight various aspects of your GKE spend.

Dashboard navigation bar

Note

Widgets on the GKE Lens dashboard are updated independently of each other. See Refresh report data for more information.

Control Plane Cost

GKE Lens: Control Plane Cost

Shows the cost of the GKE control plane (also known as master node) across all clusters in the last 6 months.

Report configuration:

  • Metric: Cost
  • Aggregation: Total
  • Time Interval: Month
  • Time Range: Last 6 months (include current month)
  • Group by: SKU, Region
  • Filters:
    • Limit by value: Cost not between -US$0.01 AND US$0.01
    • Service equals Kubernetes Engine (GKE)

GKE Nodes Cost by Cluster

GKE Lens: GKE Nodes Cost by Cluster

Shows GKE nodes cost in the last 30 days with forecast for the next 30 days.

Report configuration:

  • Metric: Cost
  • Aggregation: Total
  • Advanced Analysis: Forecast
  • Time Interval: Day
  • Time Range: Last 30 days (include current day)
  • Group by: GKE Cluster
  • Filters:
    • GKE Cluster not equals [GKE Cluster N/A]: to exclude clusters not tracked by GKE cost allocation (see View GKE cluster costs).
    • SKU is not one of Autopilot Kubernetes Clusters, Regional Kubernetes Clusters, or Zonal Kubernetes Clusters.
Note

If you run workloads on GKE Autopilot, be aware that the Autopilot pricing model is based on resources requested by your Pods instead of Nodes. See Google Kubernetes Engine pricing: Autopilot mode for details.

Cost by Top 15 Namespaces

GKE Lens: Cost by Top 15 Namespaces

Shows the top 15 Kubernetes namespaces by cost across all clusters in the last 7 days.

Report configuration:

  • Metric: Cost
  • Aggregation: Total
  • Time Interval: Day
  • Time Range: Last 7 days (include current day)
  • Group by: GKE Namespace
  • Filters:
    • GKE Namespace not equals [GKE Namespace N/A]: to exclude namespaces not tracked by GKE cost allocation (see View GKE cluster costs).
    • Limit to top 15 GKE namespaces by cost

Cost by Top 20 Clusters

GKE Lens: Cost by Top 15 Namespaces

Shows the top 20 Kubernetes clusters by cost in the last 7 days.

Report configuration:

  • Metric: Cost
  • Aggregation: Total
  • Time Interval: Day
  • Time Range: Last 7 days (include current day)
  • Group by: GKE Cluster
  • Filters:
    • GKE Cluster not equals [GKE Cluster N/A]: to exclude clusters not tracked by GKE cost allocation.
    • Limit to top 20 GKE Clusters by cost

Unallocated Resources by Cluster

GKE Lens: Unallocated Resources by Cluster

Shows the cost of resources that are neither requested by workloads nor requested for system overhead in the last 7 days.

Report configuration:

  • Metric: Cost
  • Aggregation: Total
  • Time Interval: Day
  • Time Range: Last 7 days (include current day)
  • Group by: GKE Cluster
  • Filters:
    • GKE Cluster not equals [GKE Cluster N/A]: to exclude clusters not tracked by GKE cost allocation.
    • GKE Namespace equals kube:unallocated: to include resources that are neither requested by workloads nor requested for system overhead.
Note

If you run workloads exclusively on GKE Autopilot, this widget will be empty because you do not pay for unallocated resources in Autopilot.

GKE Clusters Utilization

GKE Lens: GKE Clusters Utilization

Shows the utilization of resources across GKE clusters.

Report configuration:

  • Metric: GKE Capacity Utilization
  • Aggregation: Total
  • Time Interval: Day
  • Time Range: Last 7 days (include current day)
  • Group by: GKE Cluster
  • Filters:
    • Attribution is GKE Unallocated Resources or GKE Allocated Resources
    • GKE Cluster not equals [GKE Cluster N/A]: to exclude clusters not tracked by GKE cost allocation.
Note

If you run workloads exclusively on GKE Autopilot, this widget will be empty as you do not pay for unallocated resources in Autopilot.

GKE Interactive Cost Explorer

GKE Lens: GKE Interactive Cost Explorer

A treemap that allows you to drill down from clusters to namespaces and apps.

Report configuration:

  • Metric: Cost
  • Aggregation: Total
  • Time Interval: Day
  • Time Range: Last 7 days (include current day)
  • Group by:
  • Filters:
    • GKE Cluster not equals [GKE Cluster N/A]: to exclude clusters not tracked by GKE cost allocation.
    • GKE Namespace not equals [GKE Namespace N/A]: to exclude namespaces not tracked by GKE cost allocation.

FAQ

How much does GKE Lens cost?

GKE Lens itself doesn't incur extra cost.

Note that several report widgets of GKE Lens rely on GKE cost allocation. While DoiT does not charge extra for GKE cost allocation, enabling GKE cost allocation can increase your storage costs in BigQuery. See Potential data volume increase.

Does GKE Lens support Autopilot clusters?

GKE Lens supports Autopilot clusters with limitations.

GKE Lens uses GKE cost allocation data in the Cloud Billing BigQuery export. If you enable GKE cost allocation on Autopilot clusters, usage data of unsupported resources will not be accrued (the export includes goog-k8s-unknown, goog-k8s-unsupported-sku, or <blank>/NULL, see View GKE cluster costs).

In addition, the two widgets Unallocated Resources by Cluster and GKE Clusters Utilization will always be empty.

Interactive demo

Try out our interactive demo for a hands-on walk-through experience.

If the demo doesn't display properly, try expanding your browser window or opening the demo in a new tab.