blog/kubernetes/mantaince/delete_terminating_resource.md

19 lines
372 B
Markdown
Raw Normal View History

2022-01-17 11:47:51 +08:00
# 删除处于terminating状态无法删除的资源
以namespace为例
```bash
cat <<EOF >/tmp/m.json
{
"apiVersion": "v1",
"kind": "Namespace",
"metadata": {
"name": "monitoring"
}
}
EOF
kubectl proxy
curl -k -H 'Content-Type:application/json' -X PUT --data-binary @/tmp/m.json http://127.0.0.1:8001/api/v1/namespaces/monitoring/finalize
````