简体   繁体   English

为什么GKE删除GKE集群后不删除磁盘

[英]Why GKE does not delete the disks after deletion of GKE cluster

We have observed that GKE does not delete the Disks even after deleting the cluster which results into lots of Disks for the cluster which don't even exists.我们观察到,即使在删除集群后,GKE 也不会删除磁盘,这会导致该集群产生大量甚至不存在的磁盘。

In below link, It is mentioned that GKE will not delete persistent disks but what is the rational behind not deleting the disks.在下面的链接中,提到 GKE 不会删除永久磁盘,但不删除磁盘的原因是什么。

https://cloud.google.com/kubernetes-engine/docs/how-to/deleting-a-cluster#overview https://cloud.google.com/kubernetes-engine/docs/how-to/deleting-a-cluster#overview

If we are deleting the cluster it means we don't need the resources associated with it so ideally it should delete disks too which would help in saving the storage cost too.如果我们要删除集群,则意味着我们不需要与其关联的资源,因此理想情况下它也应该删除磁盘,这也有助于节省存储成本。

Persistent disks are located independently from your virtual machine (VM) instances, so you can detach or move persistent disks to keep your data even after you delete your instances.永久性磁盘独立于您的虚拟机 (VM) 实例,因此您可以分离或移动永久性磁盘以保留您的数据,即使在您删除实例后也是如此。 This is the reason Persistent disks will not delete when we delete the cluster and also in order to prevent your data from getting lost during sudden deletion of a cluster or under some unwanted cirucmstances.这就是我们在删除集群时不会删除永久磁盘的原因,也是为了防止您的数据在突然删除集群或某些意外情况下丢失。

If you want to delete the disk also permanently then this can be fixed by first deleting all the namespaces.如果您还想永久删除磁盘,则可以通过先删除所有命名空间来解决此问题。 When you delete a claim, the corresponding PersistentVolume object and the provisioned Compute Engine persistent disk are also deleted.当您删除声明时,相应的 PersistentVolume 对象和预配的 Compute Engine 永久性磁盘也会被删除。

Refer to this SO1 and SO2 , how to delete persistent volume disks.参考这个SO1SO2 ,如何删除持久卷磁盘。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM