최신RedHat Red Hat Certified Specialist in OpenShift Administration - EX280무료샘플문제
Deploy an application
Deploy the application called oranges in the apples project so that the following conditions are true:
The application uses the ex280sa service account
No additional configuration components have been added or removed The application produces output
Explanation:
Solution:
$ oc project mercury
$ oc get pods
$ oc get all | grep deploy
$ oc describe deployment.apps/atlas | grep -L memory
$ oc set resources deployment.apps/atlas --resources=memory=80Mi
Create Project Template
Task information Details:
Generate the bootstrap project template, create it in openshift-config , update the cluster project configuration to use the template, and create a new project to validate it.
Explanation:
Solution:
* Generate the default template:
oc adm create-bootstrap-project-template -o yaml > template.yaml
* Review and edit template.yaml if required.
* Create the template in openshift-config:
oc create -f template.yaml -n openshift-config
* Edit the cluster project configuration:
oc edit project.config.openshift.io/cluster
* Add or update:
spec:
projectRequestTemplate:
name: project-request
* Save and exit.
* Create a test project:
oc new-project test123
* Verify the template behavior:
oc get project test123 -o yaml
Notes:
* The uploaded lab text shows projects.config.openshift.io cluster-admin; the standard resource is project.
config.openshift.io/cluster.
This task checks cluster-wide customization of new-project creation behavior.
Create Service Account in QED
Task information Details:
Switch to project qed .
Create service account project1-sa .
Grant the anyuid SCC to that service account.
Explanation:
Solution:
* Switch to the project:
oc project qed
* Create the service account:
oc create serviceaccount project1-sa -n qed
* Grant the SCC:
oc adm policy add-scc-to-user anyuid -z project1-sa -n qed
* Verify:
oc get sa project1-sa -n qed
oc adm policy who-can use scc anyuid
Why this matters:
* anyuid allows containers to run with arbitrary user IDs when an application requires it.
* This is a common administrative task in OpenShift for third-party container images.
This task validates service account creation and SCC assignment.
Scale an application automatically
Automatically scale the hydra application deployment configuration in the lerna project with the following requirements:
Minimum number of replicas: 6 Maximum number of replicas: 9
Target average CPU utilization: 60 percent Container CPU resource request: 25m Container CPU resource limit: 100m
Explanation:
Solution:
$ oc project lerna
$ oc get pods
$ oc get all | grep deployment
$ oc autoscale deployment.apps/hydra --max=9 --min=6 --cpu-percent=60
$ oc get hpa
$ oc set resources deployment.apps/hydra --limits=cpu=100m -- requests=cpu=25m
$ oc describe deployment.apps/hydra | grep Limits -A3