Skip to content

Instantly share code, notes, and snippets.

@jharrington22
Created December 5, 2019 21:40
Show Gist options
  • Save jharrington22/2c2af7c0d0b51894f2b4119e526f2fb1 to your computer and use it in GitHub Desktop.
Save jharrington22/2c2af7c0d0b51894f2b4119e526f2fb1 to your computer and use it in GitHub Desktop.
#!/bin/bash
for cluster in $(ocm cluster list --managed | awk '{print $2}' | grep -v NAME)
do
ocm cluster login "$cluster%" 2> /dev/null
if [ $? != 0 ]; then
echo -e "\n\nCouldn't log into $cluster\n\n"
continue
fi
oc delete ns openshift-dedicated-admin
oc logout
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment