Halaman ini menunjukkan cara melihat metrik pemanfaatan terkait biaya untuk cluster Google Kubernetes Engine (GKE). Metrik ini menjelaskan seberapa efektif
cluster dan workload GKE Anda dalam memanfaatkan resource Compute Engine
yang Anda bayar.
Anda dapat menggunakan informasi ini untuk mengoptimalkan rasio biaya terhadap performa cluster dan workload.
Metrik pengoptimalan biaya
Di tab Pengoptimalan Biaya di konsol Google Cloud , Anda dapat melihat metrik berikut untuk cluster dan workload:
Pemakaian CPU: Menampilkan diagram batang yang menunjukkan hubungan
antara metrik CPU berikut:
Digunakan: Jumlah CPU yang digunakan oleh semua container di cluster atau
workload. Dihitung dari metrik
container/cpu/core_usage_time.
Diminta: Jumlah CPU yang diminta oleh semua container di
cluster atau workload. Dihitung dari metrik
container/cpu/request_cores.
Allocatable: Jumlah CPU yang dialokasikan ke semua node di cluster.
Metrik ini ditampilkan di halaman Cluster. Dihitung dari metrik
node/cpu/allocatable_cores. Untuk cluster Autopilot, tidak ada nilai yang dapat dialokasikan
karena Google secara otomatis menyesuaikan alokasi CPU.
Batas: Batas CPU untuk semua container pada workload. Metrik ini ditampilkan di halaman Workload. Dihitung dari metrik container/cpu/limit_cores.
CPU hours: Total jumlah jam inti pada semua node dalam workload atau cluster dalam jangka waktu yang dipilih. Dihitung dari metrik
node/cpu/total_cores (untuk cluster Standard) dan metrik
container/cpu/request_cores (untuk cluster dan workload Autopilot).
Penggunaan memori: Menampilkan diagram batang yang menunjukkan hubungan
antara metrik memori berikut:
Digunakan: Jumlah memori yang digunakan oleh semua container dalam cluster atau
workload. Dihitung dari metrik
container/memory/used_bytes.
Diminta: Jumlah memori yang diminta untuk semua container dalam cluster atau workload. Dihitung dari metrik
container/memory/request_bytes.
Allocatable: Jumlah memori yang dialokasikan ke semua node dalam
cluster. Metrik ini ditampilkan di halaman Cluster. Dihitung dari metrik node/memory/allocatable_bytes. Untuk cluster Autopilot, tidak ada nilai yang dapat dialokasikan
karena Google secara otomatis menyesuaikan alokasi memori.
Batas: Batas memori untuk semua container dalam workload. Metrik ini ditampilkan di halaman Workload. Dihitung dari metrik container/memory/limit_bytes.
Jam memori: Jumlah total memori pada semua node dalam workload atau
cluster dalam jangka waktu yang dipilih. Dihitung dari metrik node/memory/total_bytes (untuk cluster) dan metrik container/memory/requested_bytes (untuk cluster dan workload Autopilot).
Melihat metrik
Untuk melihat metrik penggunaan terkait biaya, lakukan langkah-langkah berikut di konsolGoogle Cloud :
Untuk melihat metrik tingkat cluster, buka halaman Kubernetes Clusters.
Pilih jangka waktu saat metrik dirata-ratakan (penggunaan) atau diakumulasi (total jam). Misalnya, 1 hari, 1 bulan, dan lainnya. Jika
masa aktif cluster atau workload kurang dari jangka waktu yang dipilih,
metrik yang diakumulasi selama masa aktif cluster atau workload akan ditampilkan. Misalnya, Anda memilih jangka waktu 1 hari, tetapi workload baru dibuat 4 jam yang lalu, sehingga hanya metrik 4 jam yang ditampilkan.
Arahkan kursor ke metrik penggunaan untuk melihat detail selengkapnya.
Metrik pengoptimalan biaya akan ditampilkan untuk mode cluster sebagai berikut:
Cluster Standard akan selalu memiliki metrik yang digunakan, diminta, dan dialokasikan
yang terlihat pada waktu pembuatan karena penyertaan komponen GKE
terkelola dalam keseluruhan penghitungan (namespace kube-system).
Cluster Autopilot hanya menampilkan metrik saat Anda men-deploy workload
dengan permintaan tertentu ke cluster. Hal ini disebabkan oleh model harga Autopilot. Cluster autopilot tidak menampilkan metrik yang dapat dialokasikan karena
Anda hanya membayar resource yang diminta oleh workload yang berjalan.
Workload yang di-deploy ke cluster Standard yang tidak memiliki permintaan atau batas yang ditentukan, tidak akan menampilkan rasio pada diagram. Sebaliknya, diagram batang
hanya akan mewakili metrik penggunaan workload.
Workload yang di-deploy ke cluster Autopilot yang tidak memiliki permintaan atau batas yang ditentukan akan menerapkan nilai default ke container, dan akan menampilkan rasionya setiap saat.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-01 UTC."],[],[],null,["# View cost-related optimization metrics\n\n[Autopilot](/kubernetes-engine/docs/concepts/autopilot-overview) [Standard](/kubernetes-engine/docs/concepts/choose-cluster-mode)\n\n*** ** * ** ***\n\nThis page shows you how to view cost-related utilization metrics for your\nGoogle Kubernetes Engine (GKE) clusters. These metrics describe how effectively your\nGKE clusters and workloads are utilizing the Compute Engine\nresources you pay for.\n\nYou can use this information to optimize the cost-to-performance ratio of your\nclusters and workloads.\n\nCost optimization metrics\n-------------------------\n\nIn the **Cost Optimization** tab in the Google Cloud console, you can view the following\nmetrics for your clusters and workloads:\n\n- **CPU utilization:** Displays a bar chart that shows the relationship between the following CPU metrics:\n - **Used** : The amount of CPU used by all containers in the cluster or workload. Calculated from the [`container/cpu/core_usage_time`](/monitoring/api/metrics_kubernetes#kubernetes/container/cpu/core_usage_time) metric.\n - **Requested** : The amount of CPU requested by all containers in the cluster or workload. Calculated from the [`container/cpu/request_cores`](/monitoring/api/metrics_kubernetes#kubernetes/container/cpu/request_cores) metric.\n - **Allocatable** : The amount of CPU allocated to all nodes in the cluster. This metric is shown on the Clusters page. Calculated from the [`node/cpu/allocatable_cores`](/monitoring/api/metrics_kubernetes#kubernetes/node/cpu/allocatable_cores) metric. For Autopilot clusters, there is no allocatable value because Google automatically adjusts CPU allocations.\n - **Limit** : The CPU limit for all containers in a workload. This metric is shown on the Workloads page. Calculated from the [`container/cpu/limit_cores`](/monitoring/api/metrics_kubernetes#kubernetes/container/cpu/limit_cores) metric.\n- **CPU hours** : The total number of core hours on all nodes in a workload or cluster within the selected timeframe. Calculated from the [`node/cpu/total_cores`](/monitoring/api/metrics_kubernetes#kubernetes/node/cpu/total_cores) metric (for Standard clusters) and the [`container/cpu/request_cores`](/monitoring/api/metrics_kubernetes#kubernetes/container/cpu/request_cores) metric (for Autopilot clusters and workloads).\n- **Memory utilization** : Displays a bar chart that shows the relationship between the following memory metrics:\n - **Used** : The amount of memory used by all containers in a cluster or workload. Calculated from the [`container/memory/used_bytes`](/monitoring/api/metrics_kubernetes#kubernetes/container/memory/used_bytes) metric.\n - **Requested** : The amount of memory requested for all containers in a cluster or workload. Calculated from the [`container/memory/request_bytes`](/monitoring/api/metrics_kubernetes#kubernetes/container/memory/request_bytes) metric.\n - **Allocatable** : The amount of memory allocated to all nodes in the cluster. This metric is shown on the Clusters page. Calculated from the [`node/memory/allocatable_bytes`](/monitoring/api/metrics_kubernetes#kubernetes/node/memory/allocatable_bytes) metric. For Autopilot clusters, there is no allocatable value because Google automatically adjusts memory allocations.\n - **Limit** : The memory limit for all containers in a workload. This metric is shown on the Workloads page. Calculated from the [`container/memory/limit_bytes`](/monitoring/api/metrics_kubernetes#kubernetes/container/memory/limit_bytes) metric.\n- **Memory hours** : The total amount of memory on all nodes in a workload or cluster within the selected timeframe. Calculated from the [`node/memory/total_bytes`](/monitoring/api/metrics_kubernetes#kubernetes/node/memory/total_bytes) metric (for clusters) and the [`container/memory/requested_bytes`](/monitoring/api/metrics_kubernetes#kubernetes/container/memory/requested_bytes) metric (for Autopilot clusters and workloads).\n\nView the metrics\n----------------\n\nTo view cost-related utilization metrics, perform the following steps in the\nGoogle Cloud console :\n\n1. To see cluster-level metrics, go to the **Kubernetes Clusters** page.\n\n [Go to Kubernetes Clusters](https://console.cloud.google.com/kubernetes/list)\n\n To see workload-level metrics, go to the **Workloads** page.\n\n [Go to Workloads](https://console.cloud.google.com/kubernetes/workload)\n2. Select the **Cost Optimization** tab.\n\n3. Choose the timeframe over which the metrics are averaged (utilization) or\n accumulated (total hours). For example, 1 day, 1 month, and more. If the\n lifetime of the cluster or workload is less than the selected timeframe,\n metrics accumulated for the lifetime of cluster or workload displays. For\n example, you choose a timeframe of 1 day but the workload was created only\n 4 hours ago, so only 4 hours of metrics are displayed.\n\n4. Hold the pointer over the utilization metric to see further details.\n\nCost optimization metrics will display for cluster modes as follows:\n\n- Standard clusters will always have used, requested and allocatable metrics visible at creation time due to the inclusion of managed GKE components in the overall calculation (kube-system namespace).\n\n\u003c!-- --\u003e\n\n- Autopilot clusters only display metrics when you deploy workloads with specified requests to the cluster. This is due to the [Autopilot pricing](/kubernetes-engine/pricing#autopilot_mode) model. Autopilot clusters don't show allocatable metrics because you only pay for resources requested by your running workloads.\n\nWorkloads deployed to Standard clusters that don't have requests or\nlimits specified, won't show a ratio on the chart. Instead, the bar chart\nwill represent just the workload usage metric.\n\nWorkloads deployed to Autopilot clusters that don't have requests or\nlimits specified, will have [default](/kubernetes-engine/docs/concepts/autopilot-overview#default_container_resource_requests)\nvalues applied to the containers, and will show the ratios at all times.\n\nWhat's next\n-----------\n\n- Learn about [Best practices for running cost-optimized applications on GKE](/architecture/best-practices-for-running-cost-effective-kubernetes-applications-on-gke).\n- Read the [Create a cost-optimized cluster in just a few clicks](/blog/products/containers-kubernetes/gke-setup-guide-automates-creation-of-cost-optimized-cluster) blog post.\n- Learn how to [view observability metrics](/kubernetes-engine/docs/how-to/view-observability-metrics)."]]