Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to delete PVC and recycle PV

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

How to delete PVC recycling PV, in view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

When PV is no longer needed, it can be recycled by deleting PVC.

When PVC mypvc1 is deleted, we find that Kubernetes launches a new Pod recycler-for-mypv1, and the purpose of this Pod is to clean up PV mypv1 data. At this time, the status of mypv1 is Released, which means that the Bound with mypvc1 has been removed and the data is being cleared, but it is not available at this time.

When the data is cleared, the status of the mypv1 changes back to Available, which can be applied for by the new PVC.

Update PV through kubectl apply:

① recreates the mypvc1.

② creates the file hello in mypv1.

The ③ mypv1 status changes to Released.

④ Kubernetes does not start Pod recycler-for-mypv1.

The data in ⑤ PV is preserved intact.

Although the data in the mypv1 is retained, its PV status is always in Released and cannot be requested by other PVC. To reuse the storage resource, you can delete and recreate the mypv1. The delete operation only deletes the PV object, and the data in the storage space is not deleted.

The newly created mypv1 has a status of Available and can be applied for by PVC.

PV also supports Delete's recycling policy, which removes the corresponding storage space of PV on Storage Provider. PV of NFS does not support Delete, and Provider that supports Delete include AWS EBS, GCE PD, Azure Disk, OpenStack Cinder Volume and so on.

This is the answer to the question about how to delete PVC and recycle PV. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report