A new user named 'sarah' requires read-only access to all resources within the 'web-frontend' project. Which CLI command creates the appropriate RoleBinding?
Trap 1: oc set role view sarah -n web-frontend
This command syntax is invalid for binding roles.
Trap 2: oc add-user sarah --role=view -n web-frontend
This command does not exist in OpenShift CLI.
- A
oc set role view sarah -n web-frontend
Why wrong: This command syntax is invalid for binding roles.
- B
oc create rolebinding sarah-view --clusterrole=view --user=sarah -n web-frontend
Both commands are valid, but the policy command is the standard streamlined helper. Let's adjust to ensure unique correctness or select the standard policy command.
- C
oc adm policy add-role-to-user view sarah -n web-frontend
This command binds the 'view' role to user 'sarah' in the 'web-frontend' namespace.
- D
oc add-user sarah --role=view -n web-frontend
Why wrong: This command does not exist in OpenShift CLI.