TroubleShooting

[Troubleshoot] Kubernetes PV(Persistent Volume) Terminating 상태 지속

[앙금빵] 2022. 5. 15.

 

개요

pv 삭제하는 과정에서 Terminating 상태 지속


원인

pv 매니페스트 파일 내 finalizers 필드값에 pv-protection 이 설정되어있기 때문이다.

시스템에 의해 데이터 유실을 예방하기 위해 쿠버네티스에서는 Protection 기능을 제공한다.

 

자세한 내용은 쿠버네티스 공식문서에서 확인할 수 있다.

https://kubernetes.io/docs/concepts/storage/persistent-volumes/

 

Persistent Volumes

This document describes persistent volumes in Kubernetes. Familiarity with volumes is suggested. Introduction Managing storage is a distinct problem from managing compute instances. The PersistentVolume subsystem provides an API for users and administrator

kubernetes.io


 

해결방안

1안. kubectl edit <pv name> 으로 들어가서 finalizers 필드 항목 삭제

2안. kubectl delete pv <pv name> --grace-period=0 --force

 


참조

https://stackoverflow.com/questions/55672498/kubernetes-clustsr-stuck-on-removing-pv-pvc

댓글