Skip to content

Instantly share code, notes, and snippets.

@hydrz
Last active November 28, 2019 04:29
Show Gist options
  • Save hydrz/df60478f3b39a3f3839c1a1b93f21ef4 to your computer and use it in GitHub Desktop.
Save hydrz/df60478f3b39a3f3839c1a1b93f21ef4 to your computer and use it in GitHub Desktop.
k8s管理脚本
#!/bin/sh
kubectl proxy
NS=annoying-namespace-to-delete
kubectl get namespace ${NS} -o json > tmp.json
curl -k -H “Content-Type: application/json” -X PUT –data-binary @tmp.json http://127.0.0.1:8001/api/v1/namespaces/${NS}/finalize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment