Last active
December 1, 2020 06:11
-
-
Save williamcaban/d62f26add395c13441410e141c89c5df to your computer and use it in GitHub Desktop.
OpenShift Quick Commands
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
| # User privileges | |
| # Add admin privileges to user in particular project | |
| $ oc adm policy add-role-to-user admin <user> -n <project> | |
| # Add cluster-admin privileges to user | |
| $ oc adm policy add-cluster-role-to-user cluster-admin <user> | |
| #Reference | |
| https://docs.openshift.com/container-platform/latest/admin_guide/manage_rbac.html#managing-role-bindings |
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
| # OpenShift Storage Class Annotations | |
| # To setup default storageclass change the value of the annotation storageclass.kubernetes.io/is-default-class to true | |
| $ oc get storageclass | |
| # Remove storage class as "default" | |
| $ oc patch storageclass <name-of-storageclass> -p '{"metadata": {"annotations": \ | |
| {"storageclass.kubernetes.io/is-default-class": "false"}}}' | |
| # Set storage class as "default" | |
| $ oc patch storageclass <name-of-storageclass> -p '{"metadata": {"annotations": \ | |
| {"storageclass.kubernetes.io/is-default-class": "true"}}}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment