Skip to main content

GKE Lens

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

Note

Required Permissions: Cloud Analytics

Access GKE Lens dashboard

The GKE Lens dashboard is automatically created when 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

Note

To take full advantage of GKE Lens, you should have enabled 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 every 12 hours by default, independent 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
  • Group by: SKU, Region
  • Filters:
    • Metric filter: 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
  • 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).
    • Label goog-gke-node equals [Value N/A]: to include Compute Engine VM instance underlying a GKE node (see Automatically applied labels).

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
  • 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
  • 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
  • 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.

GKE Clusters Utilization

GKE Lens: GKE Clusters Utilization

Shows the utilization of resources across GKE clusters.

Report configuration:

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
  • 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.