解決k8s namespace terminating無法刪除的問題


 

刪除報錯
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
Error from server (Conflict): Operation cannot be fulfilled on namespaces "etcd": The system is ensuring all content is removed from this namespace. Upon completion, this namespace will automatically be purged by the system

 

查看namespace,狀態為terminating

 

 

 解決方式:

1.在master節點上啟動proxy

kubectl proxy --port=8009

2.執行刪除命令

ns=etcd

curl -X PUT     --data-binary @<(kubectl get namespace $ns -o json | sed 's/"kubernetes"//g')     -H "Content-Type: application/json"     http://127.0.0.1:8009/api/v1/namespaces/$ns/finalize

 

 刪除成功,再查看namespace 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM