kubectl get ns <your-name-space> | kubectl neat > temp-ns.json
Note: The kubectl neat
is optional.
Output of the above might looks like below content, remove the "kubernetes"
under finalizers array and save the file.
{
"apiVersion": "v1",
"kind": "Namespace",
"metadata": {"name":"test"},
"spec": {
"finalizers": [
"kubernetes"
]
}
}
Run `kubectl proxy' in another terminal then
curl -X PUT http://localhost:8001/api/v1/namespaces/<your-namespace>/finalize -H "Content-Type: application/json" --data @temp-ns.json