Puedes identificar los clústeres estándar de Google Kubernetes Engine (GKE) inactivos mediante estadísticas y recomendaciones del Recomendador del clúster inactivo.
Después de verificar que los clústeres inactivos identificados no se usen, puedes borrarlos para ahorrar costos. El recomendador de clústeres inactivos no es relevante para los clústeres de Autopilot, que generan costos operativos mínimos, ya que solo pagas por los recursos que solicitan tus cargas de trabajo. Para obtener más información, consulta Precios de Autopilot.
GKE supervisa tus clústeres y ofrece orientación para optimizar el uso a través del recomendador, un servicio que proporciona estadísticas y recomendaciones sobre el uso de recursos en Google Cloud.
Para identificar clústeres inactivos, consulta las estadísticas y las recomendaciones generadas por el recomendador de clústeres inactivos mediante la consola de Google Cloud, Google Cloud CLI o la API del Recomendador. Usa los subtipos de estadísticas que se muestran en la tabla de la siguiente sección y el subtipo de recomendación CLUSTER_IDLE. En la consola, estas estadísticas aparecen en la pestaña Optimización de costos en la página Clústeres.
Cómo el recomendador identifica clústeres inactivos
Este recomendador usa señales internas para determinar si debes recibir una estadística o recomendación.
En la siguiente tabla, se describen los indicadores que usa el recomendador de clústeres inactivos y el umbral para cada señal. Cada indicador activa una estadística independiente. Si hay varias estadísticas para el mismo clúster, GKE muestra una sola recomendación.
Subtipo de estadística
Indicador
Umbral
Detalles
CLUSTER_IDLE_NO_RUNNING_PODS
Sin Pods de clientes en ejecución
Últimos 30 días
Hay cero Pods en el estado Running fuera del espacio de nombres kube-system y gmp-system en los registros de eventos de las métricas del clúster de los últimos 30 días.
CLUSTER_IDLE_NO_NODES
Sin nodos ni grupos de nodos
Últimos 30 días
Hay cero nodos o grupos de nodos en los registros de eventos de las métricas del clúster para el clúster durante los últimos 30 días.
CLUSTER_IDLE_LOW_CPU_UTILIZATION
Poco uso de CPU y sin objetos nuevos
Inferior al 7% promedio en una hora y en los últimos 30 días
El uso de CPU (promediado en 1 hora) es inferior al 7% y no hubo ningún cambio en el recuento de objetos durante los últimos 30 días.
Consideraciones para borrar clústeres inactivos
Antes de borrar un clúster inactivo recomendado por el recomendador de clúster inactivo, ten en cuenta las siguientes posibilidades:
¿Alguien usa el clúster? Por ejemplo, un clúster puede estar inactivo de forma intencional si su propósito es mantener la capacidad de conmutación por error.
¿Se puede reducir la escala del clúster en lugar de borrarlo? Por ejemplo, un clúster que ejecuta una carga de trabajo útil puede tener un uso bajo y se identifica como inactivo porque se aprovisionaron más recursos de los necesarios.
Implementa la recomendación para borrar clústeres inactivos
Si recibiste una estadística y recomendación de que tienes un clúster inactivo que se puede borrar y descartaste las consideraciones para mantener el clúster en ejecución, sigue las instrucciones en la recomendación y borrar el clúster.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2024-09-05 (UTC)"],[],[],null,["# Identify idle GKE clusters\n\n[Standard](/kubernetes-engine/docs/concepts/choose-cluster-mode)\n\n*** ** * ** ***\n\nYou can identify idle Google Kubernetes Engine (GKE) Standard clusters\nusing insights and recommendations. After you verify that the identified idle\nclusters are unused, you can delete them to save costs. If possible, the\nrecommendation includes projected monthly savings for deleting a cluster. For\nmore information, see [Understand cost estimation for idle\nclusters](#cost-estimate).\n\nGKE provides insights and recommendations for cost optimization\nscenarios such as underprovisioned clusters, overprovisioned clusters, and idle\nclusters, with corresponding recommendations to scale up, scale down, or delete\nthe clusters. This page explains how to identify idle clusters. See also,\n[Identify underprovisioned and overprovisioned GKE\nclusters](/kubernetes-engine/docs/how-to/optimize-cluster-utilization).\n\nGKE doesn't provide insights for Autopilot\nclusters, which incur minimal operational costs as you only pay for the\nresources that your workloads request. For more information, see\n[Autopilot\nPricing](/kubernetes-engine/docs/concepts/autopilot-overview#pricing).\n\nGKE monitors your clusters and delivers guidance to optimize your\nusage through [Active Assist](/recommender/docs/whatis-activeassist), a\nservice that provides recommenders that generate insights and recommendations\nfor using resources on Google Cloud.\n\nFor more information about how to manage insights and recommendations, see\n[Optimize your usage of GKE with insights and recommendations](/kubernetes-engine/docs/how-to/optimize-with-recommenders).\n\nIdentify idle clusters\n----------------------\n\nTo identify idle clusters, [view insights and\nrecommendations](/kubernetes-engine/docs/how-to/optimize-with-recommenders#view-insights-recs)\nusing the Google Cloud console, the Google Cloud CLI, or the Recommender API. Use\nthe insight subtypes shown in [the table in the following\nsection](#how-idle-clusters) and the `CLUSTER_IDLE` recommendation subtype. In\nthe console, these insights appear in the **Cost Optimization**\ntab on the **Clusters** page.\n\nAfter you identify idle clusters, see the [considerations when deleting idle\nclusters](#idle-cluster-considerations).\n\nHow GKE identifies idle clusters\n--------------------------------\n\nGKE uses utilization signals to determine whether you receive an\ninsight and recommendation.\n\nThe following table describes the signals that GKE uses and the\nthreshold for each signal. Each signal triggers an independent insight. If a\ncluster has multiple insights, GKE displays a single\nrecommendation.\n\nGKE doesn't send recommendations for clusters that were created\nless than 30 days ago.\n\nUnderstand cost estimation for idle clusters\n--------------------------------------------\n\nIf possible, GKE includes with the recommendation an estimated\nmonthly cost of the idle cluster, projecting how much money you'd save each\nmonth if you deleted the cluster. This estimate is derived from the cluster\ncosts over the past 30 days.\n\nAny estimated savings are projections based on previous spending, and are not a\nguarantee of future cost or savings.\n\nTo see these estimates, ensure that you have the required\n`billing.accounts.getSpendingInformation` permission to get spending\ninformation. For details, see [Cloud Billing\naccess](/billing/docs/how-to/billing-access#billing-access).\n\nTo get more information about the cost of all of your GKE\nclusters, including a more granular breakdown based on namespaces and workloads,\nsee [Get key spending insights for your GKE resource allocation\nand cluster costs](/kubernetes-engine/docs/how-to/cost-allocations).\n\nFor more information about the costs of running a GKE cluster,\nsee [GKE pricing](/kubernetes-engine/pricing).\n\nConsiderations when deleting idle clusters\n------------------------------------------\n\nBefore you delete a cluster that GKE determines is idle,\nconsider the following possibilities:\n\n- Does anyone use the cluster? For example, a cluster might be intentionally idle if its purpose is to maintain failover capacity.\n- 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.\n\nImplement the recommendation to delete idle clusters\n----------------------------------------------------\n\nIf you've received an insight and recommendation that you have an idle cluster\nthat can be deleted and have ruled out the [considerations](#idle-cluster-considerations)\nfor keeping the cluster running, follow the instructions in the recommendation\nand delete the cluster.\n\nWhat's next\n-----------\n\n- [Optimize your usage of GKE with insights and recommendations](/kubernetes-engine/docs/how-to/optimize-with-recommenders).\n- [Best practices for running cost-optimized Kubernetes applications on GKE](/architecture/best-practices-for-running-cost-effective-kubernetes-applications-on-gke)."]]