Created
September 22, 2020 06:39
-
-
Save ikurni/d69ddef919a488e038ba5a14b9c3408a to your computer and use it in GitHub Desktop.
Force OCP Project Deletion if Stuck in Terminating
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Get namespace information on json format ### | |
oc get namespace <namespacename> -o json > tmp.json | |
### Edit file tmp.json, remove "kubernetes" on the finalizer section, left [] behind ### | |
vi tmp.json | |
### Save and Exit ### | |
### Run below command to hit API via proxy ### | |
oc proxy | |
### Open another shell terminal, while keep "oc proxy" terminal in other session### | |
### Run below command to force remove the project ### | |
curl -k -H "Content-Type: application/json" -X PUT --data-binary @tmp.json http://127.0.0.1:8001/api/v1/namespaces/namespacename/finalize |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment