- jq
- kubectl
- Download
kubeconfig
file
- Config your terminal, export your new kubeconfig
KUBECONFIG=<kubeconfig-downloaded>.yaml
- Enable proxy, when you do it, you will get an out similar to this:
Your kube context contains a server path /k8s/clusters/<cluster-code>
save that code from the path for later
kubectl proxy
- Config some env variables in another terminal
NAMESPACE=<namespace-for-eliminating>
CLUSTER=<cluster-code>
KUBECONFIG=<kubeconfig-downloaded>.yaml
- Update namespace config in a file
kubectl get namespace $NAMESPACE -o json | jq '.spec = {"finalizers":[]}' > temp.json
- Apply new config
curl -k -H "Content-Type: application/json" -X PUT --data-binary @temp.json 127.0.0.1:8001/k8s/clusters/$CLUSTER/api/v1/namespaces/$NAMESPACE/finalize
After these commands, the terminating namespace will disappear