Skip to content

Instantly share code, notes, and snippets.

@steigr
Created December 30, 2018 11:40
Show Gist options
  • Save steigr/12bab3a0d8444b5553423c0408ea2f8d to your computer and use it in GitHub Desktop.
Save steigr/12bab3a0d8444b5553423c0408ea2f8d to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
namespace=$1
kubectl proxy&
trap "kill $!" EXIT
kubectl get "namespaces/$namespace" -o json \
| jq 'del(.spec.finalizers)' \
| curl -H "Content-Type: application/json" -X PUT --data-binary @- "http://127.0.0.1:8001/api/v1/namespaces/$namespace/finalize"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment