최신RedHat Red Hat Certified Specialist in OpenShift Administration - EX280무료샘플문제
문제1
Install Helm Chart
Task information Details:
Add the Helm repository do280-repo and install the example-app release from the specified chart.
Install Helm Chart
Task information Details:
Add the Helm repository do280-repo and install the example-app release from the specified chart.
정답:
See the solution below in Explanation.
Explanation:
Solution:
* Add the repository:
helm
repo add do280-repo http://helm.ocp4.example.com/charts
* Refresh repositories:
helm repo update
* Install the chart:
helm install example-app do280-repo/etherpad
* Verify:
helm list
oc get all
Notes:
* The uploaded lab text appears to spell the chart name incorrectly as ehterpad.
* In practice, use the actual chart name published in the repo. If the lab repo truly contains the typo, follow the repo index result.
This task tests Helm repository management and application deployment.
Explanation:
Solution:
* Add the repository:
helm
repo add do280-repo http://helm.ocp4.example.com/charts
* Refresh repositories:
helm repo update
* Install the chart:
helm install example-app do280-repo/etherpad
* Verify:
helm list
oc get all
Notes:
* The uploaded lab text appears to spell the chart name incorrectly as ehterpad.
* In practice, use the actual chart name published in the repo. If the lab repo truly contains the typo, follow the repo index result.
This task tests Helm repository management and application deployment.
문제2
Start a Probe in Project Start
Task information Details:
Add a Liveness Probe to the deployment in project start using the Web Console.
Start a Probe in Project Start
Task information Details:
Add a Liveness Probe to the deployment in project start using the Web Console.
정답:
See the solution below in Explanation.
Explanation:
Solution:
* Open the Web Console.
* Switch to project start .
* Navigate to: Workloads # Deployments
* Select the target deployment.
* Click the action menu and choose: Add Health Checks
* Select Liveness Probe .
* Configure the appropriate probe type:
* HTTP
* TCP
* or Command
* Enter the required endpoint or command based on the application.
* Save the configuration.
* Verify the deployment updates successfully and the pod status remains healthy.
CLI alternative if needed:
oc set probe deployment/ < deployment-name >
--liveness --get-url=http://:8080/ --initial-delay-seconds=10
This task measures health-check configuration for workload self-recovery.
Explanation:
Solution:
* Open the Web Console.
* Switch to project start .
* Navigate to: Workloads # Deployments
* Select the target deployment.
* Click the action menu and choose: Add Health Checks
* Select Liveness Probe .
* Configure the appropriate probe type:
* HTTP
* TCP
* or Command
* Enter the required endpoint or command based on the application.
* Save the configuration.
* Verify the deployment updates successfully and the pod status remains healthy.
CLI alternative if needed:
oc set probe deployment/ < deployment-name >
--liveness --get-url=http://:8080/ --initial-delay-seconds=10
This task measures health-check configuration for workload self-recovery.
문제3
Create a PV and PVC
Task information Details:
Create a PersistentVolume named landing-pv with 1Gi , ReadOnlyMany , NFS backend, and Retain reclaim policy.
Create a PersistentVolumeClaim named landing-pvc requesting 1Gi , ReadOnlyMany , and storage class nfs2 .
Create a PV and PVC
Task information Details:
Create a PersistentVolume named landing-pv with 1Gi , ReadOnlyMany , NFS backend, and Retain reclaim policy.
Create a PersistentVolumeClaim named landing-pvc requesting 1Gi , ReadOnlyMany , and storage class nfs2 .
정답:
See the solution below in Explanation.
Explanation:
Solution:
* Create landing-pv.yaml:
apiVersion: v1
kind: PersistentVolume
metadata:
name: landing-pv
spec:
capacity:
storage: 1Gi
accessModes:
- ReadOnlyMany
nfs:
path: /open001
server: 192.168.2.2
persistentVolumeReclaimPolicy: Retain
* Apply it:
oc apply -f landing-pv.yaml
* Create landing-pvc.yaml:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: landing-pvc
spec:
accessModes:
- ReadOnlyMany
resources:
requests:
storage: 1Gi
storageClassName: nfs2
* Apply it:
oc apply -f landing-pvc.yaml
* Verify:
oc get pv
oc get pvc
oc describe pv landing-pv
oc describe pvc landing-pvc
This task validates persistent storage provisioning and claim binding concepts.
Explanation:
Solution:
* Create landing-pv.yaml:
apiVersion: v1
kind: PersistentVolume
metadata:
name: landing-pv
spec:
capacity:
storage: 1Gi
accessModes:
- ReadOnlyMany
nfs:
path: /open001
server: 192.168.2.2
persistentVolumeReclaimPolicy: Retain
* Apply it:
oc apply -f landing-pv.yaml
* Create landing-pvc.yaml:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: landing-pvc
spec:
accessModes:
- ReadOnlyMany
resources:
requests:
storage: 1Gi
storageClassName: nfs2
* Apply it:
oc apply -f landing-pvc.yaml
* Verify:
oc get pv
oc get pvc
oc describe pv landing-pv
oc describe pvc landing-pvc
This task validates persistent storage provisioning and claim binding concepts.
문제4
Create a CronJob test-cron
Task information Details:
Create service account jupiter .
Grant anyuid SCC and cluster- admin to it.
Update CronJob cron-test to use that service account.
Create a CronJob test-cron
Task information Details:
Create service account jupiter .
Grant anyuid SCC and cluster- admin to it.
Update CronJob cron-test to use that service account.
정답:
See the solution below in Explanation.
Explanation:
Solution:
* Switch to the project hosting the cronjob, if needed:
oc project cron-test
* Create the service account:
oc create sa jupiter
* Grant anyuid:
oc adm policy add-scc-to-user anyuid -z jupiter -n cron-test
* Grant cluster-admin:
oc adm policy add-cluster-role-to-user cluster-admin system:serviceaccount:cron-test:jupiter
* Update the cronjob:
oc patch cronjob cron-test -p '{"spec":{"jobTemplate":{"spec":{"template":{"spec":{"serviceAccountName":" jupiter"}}}}}}'
* Verify:
oc get cronjob cron-test -o yaml | grep serviceAccountName
Notes:
* The uploaded lab uses oc set sa cronjob.batch/cron-test jupiter, which is not the usual command form for CronJobs. Patching the pod template is the reliable method.
This task checks service account and privilege adjustments for scheduled workloads.
Explanation:
Solution:
* Switch to the project hosting the cronjob, if needed:
oc project cron-test
* Create the service account:
oc create sa jupiter
* Grant anyuid:
oc adm policy add-scc-to-user anyuid -z jupiter -n cron-test
* Grant cluster-admin:
oc adm policy add-cluster-role-to-user cluster-admin system:serviceaccount:cron-test:jupiter
* Update the cronjob:
oc patch cronjob cron-test -p '{"spec":{"jobTemplate":{"spec":{"template":{"spec":{"serviceAccountName":" jupiter"}}}}}}'
* Verify:
oc get cronjob cron-test -o yaml | grep serviceAccountName
Notes:
* The uploaded lab uses oc set sa cronjob.batch/cron-test jupiter, which is not the usual command form for CronJobs. Patching the pod template is the reliable method.
This task checks service account and privilege adjustments for scheduled workloads.