Kubernetes - Delete a namespace in Terminating status

scnzzh@zubt1:~$ kubectl get ns rook-ceph
NAME        STATUS        AGE
rook-ceph   Terminating   118m

scnzzh@zubt1:~$ kubectl get ns rook-ceph -o json > rook-ceph-ns.json


Edit the json file and make the value for "finalizers" an empty list. In my case, theres an item "kubernetes" in the list, delete it.

scnzzh@zubt1:~$ kubectl replace --raw "/api/v1/namespaces/rook-ceph/finalize" -f rook-ceph-ns.json


scnzzh@zubt1:~$ kubectl get ns rook-ceph
Error from server (NotFound): namespaces "rook-ceph" not found

 

Kubernetes - Delete a namespace in Terminating status

上一篇:HTTPS通信过程


下一篇:【Azure 存储服务】Blob中数据通过Stream Analytics导出到SQL/Cosmos DB