EX280試験無料問題集「RedHat Red Hat Certified Specialist in OpenShift Administration 認定」

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.
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.
正解:
See the solution below in Explanation.
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.
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.
正解:
See the solution below in Explanation.
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 Secret with Name Magic in Math Project
Task information Details:
Create a secret named magic in the math project that stores MYSQL_ROOT_PASSWORD=redhat .
正解:
See the solution below in Explanation.
Explanation:
Solution:
* Switch to the math project:
oc project math
* Create the secret:
oc create secret generic magic --from-literal=MYSQL_ROOT_PASSWORD=redhat
* Verify:
oc get secret magic
oc describe secret magic
Note:
* The uploaded lab text contains a typo --from-listeral; the valid option is --from-literal.
* The output in the lab also appears inconsistent. The intended secret name is magic .
This task checks secret creation and secure configuration data handling.