更详细的GCS桶计费信息

问题描述 投票:0回答:2

我有多个 GKE 集群,其中使用命名空间逻辑上分离的 K8s 对象,每个命名空间都附加了 GCS 存储桶(有状态集) 我想了解有关每个命名空间的计费信息以及每个命名空间的资源使用成本。 我发现了一个非常有用的功能,称为“GKE Metering”,是的,它通过收集计费信息并将其导入 BigQuery,显示了有关每个命名空间的 CPU 和内存计费信息的一些有用信息,然后我可以使用 Google Data Studio 等可视化结果。

问题是:

  1. 如何获取附加的每个GCS存储桶的账单信息 到每个要可视化的命名空间?
  2. 如何获取账单信息 Filestore 实例的每个命名空间使用情况?

任何帮助将不胜感激🙌🏻 谢谢你

google-cloud-platform google-bigquery google-cloud-storage google-kubernetes-engine google-cloud-billing
2个回答
1
投票

为此,您需要在 GCS 存储桶上添加标签

然后将账单导出到 BigQuery

并获取像 BigQuery 中那样的数据

SELECT * FROM `project.dataset.exportBillingTable` WHERE "<Your Label Key>" IN UNNEST(labels.key)
您可以对标签键或标签值进行“分组”、“求和”、过滤...


0
投票
现在无需标记步骤即可使用!该更新于

2024 年 2 月 13 日发布

View granular cost data from Cloud Storage usage in Cloud Billing exports to BigQuery You can now view granular Cloud Storage bucket-level cost data in the Cloud Billing Detailed cost export. Use the resource.global_name field in the export to view and filter your detailed Cloud Storage bucket usage.
    
© www.soinside.com 2019 - 2024. All rights reserved.