-
-
Save therevoman/7b3220a7ad2c1b7b0d975ed01bc664e9 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