Openshift Flashcards
Is storage class name spaced
Storage class is not namespaced
What does Nutanix csi operator used for
Operator monitors for a CRD named nutanixcsistorages, when a CRD is created of this type in the same namespace as the operator, it installs csi driver.
What are some of custom resources created by the operator
nutanixcsistorages
Can you have two csi drivers create 2 different nutanixcsistorages crd in different namespace
No it will not work as there are some common resources that the new installation will try to create and fail with release failed
how do you list all the resources created by custom CRD
oc api-resources
Cmd to add a cluster role to a user
oc adm policy add-cluster-role-to-user ROLE username
Cmd to add a local role binding to a user
From the local project
oc policy add-role-to-user ROLE Username
Add a local role to service account
From the local project
oc policy add-role-to-user ROLE -z <svc_account_name></svc_account_name>
add a local role to a group
From the local project
oc policy add-role-to-group ROLE groupname
how do you remove a user or group from current project
From the correct project
oc policy remove-user username
oc policy remove-group groupname
Find the user account that can perform a certain action in the project
oc policy who-can <action> <resource></resource></action>
how to add scc to a user or gruop
oc adm policy add-scc-to-user <username>
oc adm policy add-scc-to-group <groupname></groupname></username>
create a new group with 2 usrs
oc adm groups new <grpname> <user1> <user2></user2></user1></grpname>
set env variables from a secret and the variables should be prefixed with DB_
oc set env deploy/<name> --from secret/<secret_name> --prefix DB_</secret_name></name>
List all the env variables in a deployment
oc set env deploy/<name> --list</name>