最新的RedHat Red Hat Certified Specialist in OpenShift Administration - EX280免費考試真題

問題1
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.
問題2
Manage Identity Provider
Task information Details:
Create the following HTPasswd users: bob, qwerty, john, armstrong, natasha, harry, susan .
Create a secret from the HTPasswd file in openshift-config .
Configure cluster OAuth to use the HTPasswd identity provider.
Restart the OAuth pods so the new authentication configuration takes effect.
正確答案:
See the solution below in Explanation.
Explanation:
Solution:
* Create the initial HTPasswd file with the first user:
htpasswd -c -B -b /tmp/htpass.txt bob indionce
* Add the remaining users:
htpasswd -b /tmp/htpass.txt qwerty catalog
htpasswd -b /tmp/htpass.txt john john123
htpasswd -b /tmp/htpass.txt armstrong natasha123
htpasswd -b /tmp/htpass.txt natasha arthstrong
htpasswd -b /tmp/htpass.txt harry harry123
htpasswd -b /tmp/htpass.txt susan susuan123
* Create the secret in openshift-config :
oc create secret generic ex280-secure --from-file=htpasswd=/tmp/htpass.txt -n openshift-config
* Edit OAuth and add the HTPasswd identity provider:
oc edit oauth cluster
* Use a valid structure like this:
spec:
identityProviders:
- name: ex280-idp-secure
mappingMethod: claim
type: HTPasswd
htpasswd:
fileData:
name: ex280-secure
* Save and exit.
* Restart OAuth pods:
oc delete pod -n openshift-authentication -l app=oauth-openshift
* Verify:
oc get pods -n openshift-authentication
oc get oauth cluster -o yaml
This task validates OpenShift local authentication configuration through HTPasswd and cluster OAuth integration.
問題3
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.
問題4
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.