Last active
May 8, 2020 04:08
-
-
Save waynedovey/f4fe71e7abbb861ad7814c148b6d53fc to your computer and use it in GitHub Desktop.
OpenShift CheetSheet
This file contains 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
#!/bin/bash | |
if [ -z "$1" ]; then | |
echo "pass a namespace" && exit 1 | |
fi | |
APIURL=$(oc whoami --show-server) | |
NAMESPACE=${1} | |
oc get namespace $NAMESPACE -o json |jq '.spec = {"finalizers":[]}' >/tmp/$NAMESPACE.json | |
curl -k -H "Authorization: Bearer $(oc whoami -t)" -H "Content-Type: application/json" -X PUT --data-binary @/tmp/$NAMESPACE.json "$APIURL/api/v1/namespaces/$NAMESPACE/finalize" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
latest