Identify idle GKE clusters

This document explains how you can identify idle Google Kubernetes Engine (GKE) Standard clusters by using Active Assist insights and recommendations. After you verify that the identified idle clusters are unused, you can delete them to help to reduce costs. When available, each recommendation includes projected monthly savings. For more information, see Understand cost estimation for idle clusters. GKE doesn't provide idle cluster insights for Autopilot clusters because you pay only for the resources that your workloads request.

To rightsize active clusters and workloads rather than deleting unused clusters, see Identify underprovisioned and overprovisioned GKE clusters and Identify underprovisioned and overprovisioned workloads. For more information about managing insights and recommendations, see Optimize your usage of GKE with insights and recommendations.

This document is for admins, architects, and operators who monitor cluster utilization and optimize cloud costs. For more information about common roles and example tasks that we reference in Google Cloud content, see Common GKE user roles and tasks.

Identify idle clusters

To identify idle clusters, view insights and recommendations using the Google Cloud console, the Google Cloud CLI, or the Recommender API. Use the insight subtypes shown in the table in the following section and the CLUSTER_IDLE recommendation subtype. In the console, these insights appear in the Cost Optimization tab on the Clusters page.

After you identify idle clusters, see the considerations when deleting idle clusters.

How GKE identifies idle clusters

GKE uses utilization signals to determine whether you receive an insight and recommendation.

The following table describes the signals that GKE uses and the threshold for each signal. Each signal triggers an independent insight. If a cluster has multiple insights, GKE displays a single recommendation.

Insight subtype Signal Observation period Details
CLUSTER_IDLE_NO_RUNNING_PODS No running customer Pods Last 30 days There are zero Pods in the Running state outside of the kube-system and gmp-system namespace in the cluster metrics events logs for the cluster during the last 30 days.
CLUSTER_IDLE_NO_NODES No nodes or node pools Last 30 days There are zero nodes or zero node pools in the cluster metrics events logs for the cluster during the last 30 days.
CLUSTER_IDLE_LOW_CPU_UTILIZATION Low CPU utilization and no new Pods Last 30 days A GKE cluster is idle with low CPU utilization when both of the following are true:
  • CPU utilization consistently averages under 7% during every hour, over the last 30 days.
  • Active Pod count remains unchanged over the last 30 days.

GKE doesn't send recommendations for clusters that were created less than 30 days ago.

Understand cost estimation for idle clusters

If possible, GKE includes with the recommendation an estimated monthly cost of the idle cluster, projecting how much money you'd save each month if you deleted the cluster. This estimate is derived from the cluster costs over the past 30 days.

Any estimated savings are projections based on previous spending, and are not a guarantee of future cost or savings.

To see these estimates, ensure that you have the required billing.accounts.getSpendingInformation permission to get spending information. For more information, see Cloud Billing access.

To get more information about the cost of all of your GKE clusters, including a more granular breakdown based on namespaces and workloads, see Get key spending insights for your GKE resource allocation and cluster costs.

For more information about the costs of running a GKE cluster, see GKE pricing.

Considerations when deleting idle clusters

Before you delete a cluster that GKE determines is idle, consider the following possibilities:

  • Does anyone use the cluster? For example, a cluster might be intentionally idle if its purpose is to maintain failover capacity.
  • Should the cluster be scaled down instead of deleted? For example, a cluster running a useful workload might have low utilization and be identified as idle because more resources were provisioned than necessary.

Implement the recommendation to delete idle clusters

If you've received an insight and recommendation that you have an idle cluster that can be deleted and have ruled out the considerations for keeping the cluster running, follow the instructions in the recommendation and delete the cluster.

What's next