OpenShift Local Status & Banner Cleanup
Check the status of the OpenShift Local (CRC) cluster and remove the default caution banner from the OpenShift web console if it exists.
Steps
-
Check CRC status Run
crc statusto verify the cluster is running and review resource usage (RAM, disk, etc.). -
Get console credentials Run
crc console --credentialsto retrieve the kubeadmin login command. - Log in as admin
Log in to the cluster as
kubeadminusing the credentials from the previous step:oc login -u kubeadmin -p <password> https://api.crc.testing:6443 - Check for the caution banner
Look for the default
ConsoleNotificationresource namedsecurity-notice. Redirect stderr to suppress any “not found” error noise:oc get consolenotification security-notice 2>/dev/null- If this produces output (a resource row), the banner exists.
- If this produces no output, the banner does not exist.
- Remove the banner (only if it exists)
If step 4 produced output (the banner exists), delete it:
oc delete consolenotification security-noticeIf step 4 produced no output (the banner does not exist), skip this step and inform the user the banner has already been removed.
Verification
crc statusshows the CRC VM and OpenShift as Runningoc get consolenotificationsreturns nosecurity-noticeresource
Changelog
See CHANGELOG.md for version history.