使用gcloud容器集群创建的GKE集群创建后如何清理? [英] How to clean up after a GKE cluster created with gcloud container clusters create?

查看:108
本文介绍了使用gcloud容器集群创建的GKE集群创建后如何清理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在以编程方式创建Kubernetes集群,以在GitLab CI/CD中进行端到端测试.我正在使用gcloud container clusters create.我做了半年,创建并删除了几百个群集.成本上升和下降.现在,我从Google那里收到了一笔异常高的账单,并检查了费用明细.我注意到存储PD容量"的成本> 95%.我发现gcloud container clusters delete从未删除Kubernetes集群中为持久卷声明创建的Google Compute Disk.

I'm creating Kubernetes clusters programmatically for end-to-end tests in GitLab CI/CD. I'm using gcloud container clusters create. I'm doing this for half a year and created and deleted a few hundred clusters. The cost went up and down. Now, I got an unusually high bill from Google and I checked the cost breakdown. I noticed that the cost is >95% for "Storage PD Capacity". I found out that gcloud container clusters delete never deleted the Google Compute Disks created for Persistent Volume Claims in the Kubernetes cluster.

如何以编程方式删除这些内容?删除Kubernetes集群和磁盘后,还有什么可以继续运行?

How can I delete those programmatically? What else could be left running after deleting the Kubernetes cluster and the disks?

推荐答案

建议:

  1. 要回答您的紧迫问题:您可以使用要确定可能还分配了哪些其他资源,请查看此处:

    To determine what other resources might have been allocated, look here: Listing all Resources in your Hierarchy.

    最后,此链接也可能有帮助:

    Finally, this link might also help: GKE: Understanding cluster resource usage

    这篇关于使用gcloud容器集群创建的GKE集群创建后如何清理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆