Update 'README.md'

This commit is contained in:
Danny Bessems 2022-06-08 09:25:31 +00:00
parent ee376a4b4f
commit bc92ca19b9
1 changed files with 9 additions and 3 deletions

View File

@ -336,9 +336,15 @@ sed -e 's|stun://<ipaddress>|stun://<ipaddress>:3479|' -i /etc/persistent/cfg/mg
or
kubectl run -it --rm busybox --restart=Never --image=busybox:1.28 -- nslookup api.github.com [-debug] [fqdn]
* Delete namespaces stuck in `Terminating` state:
* Delete namespaces stuck in `Terminating` state:
*First* check whether there are any resources still present; preventing the namespace from being deleted:
kubectl api-resources --verbs=list --namespaced -o name \
| xargs -n 1 kubectl get --show-kind --ignore-not-found -n <namespace>
kubectl get namespace <name> -o json | jq -j '.spec.finalizers=null' > tmp.json
kubectl replace --raw "/api/v1/namespaces/<name>/finalize" -f ./tmp.json
Any resources returned should be deleted first (worth mentioning: if you get an error `error: unable to retrieve the complete list of server APIs`, you should check `kubectl get apiservice` for any apiservice with a status of `False`)
If there are no resources left in the namespace, and it is still stuck *terminating*, the following commands remove the blocking finalizer (this is a last resort, you are bypassing protections put in place to prevent zombie processes):
kubectl get namespace <namespace> -o json | jq -j '.spec.finalizers=null' > tmp.json
kubectl replace --raw "/api/v1/namespaces/<namespace>/finalize" -f ./tmp.json
rm ./tmp.json