최신RedHat Red Hat Certified Specialist in OpenShift Administration - EX280무료샘플문제
문제1
Configure a service account
Configure a service account in the apples project to meet the following requirements:
The name of the account is ex280sa
The account allows pods to be run as any available user
Configure a service account
Configure a service account in the apples project to meet the following requirements:
The name of the account is ex280sa
The account allows pods to be run as any available user
정답:
See the solution below in Explanation.
Explanation:
Solution:
$ oc project apples
$ oc create sa ex280sa
$ oc adm policy add-scc-to-user anyuid -z ex280sa
Explanation:
Solution:
$ oc project apples
$ oc create sa ex280sa
$ oc adm policy add-scc-to-user anyuid -z ex280sa
문제2
Scale Application Manually
Task information Details:
Scale the httpd deployment to 5 replicas .
Scale Application Manually
Task information Details:
Scale the httpd deployment to 5 replicas .
정답:
See the solution below in Explanation.
Explanation:
Solution:
* Scale the deployment:
oc scale deployment httpd --replicas=5
* Verify:
oc get deployment httpd
oc get pods -l app=httpd
* Confirm the desired, current, and available replica counts match.
This task checks direct workload scaling using the OpenShift CLI.
Explanation:
Solution:
* Scale the deployment:
oc scale deployment httpd --replicas=5
* Verify:
oc get deployment httpd
oc get pods -l app=httpd
* Confirm the desired, current, and available replica counts match.
This task checks direct workload scaling using the OpenShift CLI.
문제3
Manage Cluster Project and Permission
Task information Details:
Create projects apollo , test , and demo .
Grant bob the cluster-admin role.
Prevent ordinary authenticated users from self-provisioning projects.
Allow john to create projects.
Give natasha view-only access to test and apollo .
Give armstrong admin access to apollo .
Remove the kubeadmin user secret.
Manage Cluster Project and Permission
Task information Details:
Create projects apollo , test , and demo .
Grant bob the cluster-admin role.
Prevent ordinary authenticated users from self-provisioning projects.
Allow john to create projects.
Give natasha view-only access to test and apollo .
Give armstrong admin access to apollo .
Remove the kubeadmin user secret.
정답:
See the solution below in Explanation.
Explanation:
Solution:
* Create the projects:
oc new-project apollo
oc new-project test
oc new-project demo
* Grant cluster-admin to bob:
oc adm policy add-cluster-role-to-user cluster-admin bob
* Disable normal self-provisioning for authenticated users:
oc adm policy remove-cluster-role-from-group self-provisioner system:authenticated:oauth
* Allow john to self-provision:
oc adm policy add-cluster-role-to-user self-provisioner john
* Give natasha view access in test and apollo:
oc policy add-role-to-user view natasha -n test
oc policy add-role-to-user view natasha -n apollo
* Give armstrong admin in apollo:
oc policy add-role-to-user admin armstrong -n apollo
* Remove kubeadmin secret:
oc delete secret kubeadmin -n kube-system
* Verify permissions:
oc adm policy who-can create projectrequests
oc describe rolebinding.rbac -n apollo
oc describe rolebinding.rbac -n test
This task tests core OpenShift administration around project lifecycle control, cluster-level RBAC, and decommissioning default bootstrap credentials.
Explanation:
Solution:
* Create the projects:
oc new-project apollo
oc new-project test
oc new-project demo
* Grant cluster-admin to bob:
oc adm policy add-cluster-role-to-user cluster-admin bob
* Disable normal self-provisioning for authenticated users:
oc adm policy remove-cluster-role-from-group self-provisioner system:authenticated:oauth
* Allow john to self-provision:
oc adm policy add-cluster-role-to-user self-provisioner john
* Give natasha view access in test and apollo:
oc policy add-role-to-user view natasha -n test
oc policy add-role-to-user view natasha -n apollo
* Give armstrong admin in apollo:
oc policy add-role-to-user admin armstrong -n apollo
* Remove kubeadmin secret:
oc delete secret kubeadmin -n kube-system
* Verify permissions:
oc adm policy who-can create projectrequests
oc describe rolebinding.rbac -n apollo
oc describe rolebinding.rbac -n test
This task tests core OpenShift administration around project lifecycle control, cluster-level RBAC, and decommissioning default bootstrap credentials.
문제4
Configure an application to use a secret
Configure the application called qed in the math project with the following requirements:
The application uses the secret previously created called: magic The secret defines an environment variable with name: DECODER_RING The application output no longer displays: Sorry, application is not configured correctly.
Configure an application to use a secret
Configure the application called qed in the math project with the following requirements:
The application uses the secret previously created called: magic The secret defines an environment variable with name: DECODER_RING The application output no longer displays: Sorry, application is not configured correctly.
정답:
See the solution below in Explanation.
Explanation:
Solution:
$ oc get all | grep deploy
$ oc set env --from=secret/magic deployment.apps/qed
Explanation:
Solution:
$ oc get all | grep deploy
$ oc set env --from=secret/magic deployment.apps/qed