ts-delete-stuck-crd

This commit is contained in:
Dominik Chilla 2021-10-16 21:59:50 +00:00
parent c59bfa9b0a
commit 4000f65fb9

View File

@ -41,6 +41,7 @@
* [Dealing with disruptions](#disruptions) * [Dealing with disruptions](#disruptions)
* [Troubleshooting](#troubleshooting) * [Troubleshooting](#troubleshooting)
* [Deleting a stuck namespace](#ts-delete-stuck-namespace) * [Deleting a stuck namespace](#ts-delete-stuck-namespace)
* [Deleting stuck CRDs](#ts-delete-stuck-crd)
# kubectl - BASH autocompletion <a name="user-content-kubectl-bash-autocompletion"></a> # kubectl - BASH autocompletion <a name="user-content-kubectl-bash-autocompletion"></a>
For current shell only: For current shell only:
@ -889,4 +890,7 @@ node/k3s-node2 uncordoned
kubectl get namespace "stucked-namespace" -o json \ kubectl get namespace "stucked-namespace" -o json \
| tr -d "\n" | sed "s/\"finalizers\": \[[^]]\+\]/\"finalizers\": []/" \ | tr -d "\n" | sed "s/\"finalizers\": \[[^]]\+\]/\"finalizers\": []/" \
| kubectl replace --raw /api/v1/namespaces/stucked-namespace/finalize -f - | kubectl replace --raw /api/v1/namespaces/stucked-namespace/finalize -f -
``` ```
## Deleting stuck CRDs <a name="user-content-ts-delete-stuck-crd"></a>
https://github.com/kubernetes/kubernetes/issues/60538#issuecomment-369099998