최신RedHat Red Hat Certified Specialist in OpenShift Automation and Integration - EX380무료샘플문제
문제1
Configure RBAC roles with users and groups
Task Information : Grant edit to group dev-team in namespace payments, and grant view to user auditor1.
Configure RBAC roles with users and groups
Task Information : Grant edit to group dev-team in namespace payments, and grant view to user auditor1.
정답:
See the solution below in Explanation:
Explanation:
* Create (or switch to) the project
* oc new-project payments
* Namespace must exist before applying rolebindings.
* Grant edit to the group
* oc -n payments policy add-role-to-group edit dev-team
* Members of dev-team can modify most resources in payments.
* Grant view to a user
* oc -n payments policy add-role-to-user view auditor1
* auditor1 can read resources but not change them.
* Verify rolebindings
* oc -n payments get rolebinding
Explanation:
* Create (or switch to) the project
* oc new-project payments
* Namespace must exist before applying rolebindings.
* Grant edit to the group
* oc -n payments policy add-role-to-group edit dev-team
* Members of dev-team can modify most resources in payments.
* Grant view to a user
* oc -n payments policy add-role-to-user view auditor1
* auditor1 can read resources but not change them.
* Verify rolebindings
* oc -n payments get rolebinding
문제2
Resolve group synchronization conflicts (prune stale data)
Task Information : Run group sync with pruning to remove stale OpenShift group memberships that no longer exist in LDAP.
Resolve group synchronization conflicts (prune stale data)
Task Information : Run group sync with pruning to remove stale OpenShift group memberships that no longer exist in LDAP.
정답:
See the solution below in Explanation:
Explanation:
* Run group sync with prune controls
* oc adm groups sync --sync-config=groupsync.yaml --confirm --prune-whitelist=/tmp/whitelist.txt
* Prune removes stale memberships/groups, but whitelist protects selected groups from pruning.
* Verify group membership reflects LDAP
* oc describe group < groupname >
* Confirms removed users are no longer listed.
Explanation:
* Run group sync with prune controls
* oc adm groups sync --sync-config=groupsync.yaml --confirm --prune-whitelist=/tmp/whitelist.txt
* Prune removes stale memberships/groups, but whitelist protects selected groups from pruning.
* Verify group membership reflects LDAP
* oc describe group < groupname >
* Confirms removed users are no longer listed.
문제3
Configure resiliency using a PodDisruptionBudget
Task Information : Ensure at least 2 replicas of payments/api remain available during voluntary disruptions.
Configure resiliency using a PodDisruptionBudget
Task Information : Ensure at least 2 replicas of payments/api remain available during voluntary disruptions.
정답:
See the solution below in Explanation:
Explanation:
* Create PDB
* cat < < EOF | oc -n payments apply -f -
* apiVersion: policy/v1
* kind: PodDisruptionBudget
* metadata:
* name: api-pdb
* spec:
* minAvailable: 2
* selector:
* matchLabels:
* app: api
* EOF
* minAvailable: 2 blocks evictions that would reduce availability below 2.
* Verify PDB
* oc -n payments get pdb
* oc -n payments describe pdb api-pdb
Explanation:
* Create PDB
* cat < < EOF | oc -n payments apply -f -
* apiVersion: policy/v1
* kind: PodDisruptionBudget
* metadata:
* name: api-pdb
* spec:
* minAvailable: 2
* selector:
* matchLabels:
* app: api
* EOF
* minAvailable: 2 blocks evictions that would reduce availability below 2.
* Verify PDB
* oc -n payments get pdb
* oc -n payments describe pdb api-pdb
문제4
Configure and synchronize OpenShift groups from LDAP (group sync)
Task Information : Create an LDAP group-sync config, run a one-time sync, and confirm groups exist in OpenShift.
Configure and synchronize OpenShift groups from LDAP (group sync)
Task Information : Create an LDAP group-sync config, run a one-time sync, and confirm groups exist in OpenShift.
정답:
See the solution below in Explanation:
Explanation:
* Create a group sync config file (example groupsync.yaml)
* This file defines how OpenShift queries LDAP for groups and members.
* Run a one-time group sync
* oc adm groups sync --sync-config=groupsync.yaml --confirm
* --confirm actually applies changes (without it, it's a dry-run preview).
* Verify groups created/updated
* oc get groups
* oc describe group < groupname >
* Confirms group objects exist and membership is present.
Explanation:
* Create a group sync config file (example groupsync.yaml)
* This file defines how OpenShift queries LDAP for groups and members.
* Run a one-time group sync
* oc adm groups sync --sync-config=groupsync.yaml --confirm
* --confirm actually applies changes (without it, it's a dry-run preview).
* Verify groups created/updated
* oc get groups
* oc describe group < groupname >
* Confirms group objects exist and membership is present.
문제5
Backup and Restore - Fix SCC for Restored Application
Backup and Restore - Fix SCC for Restored Application
정답:
See the solution below in Explanation:
Explanation:
Step 1: Identify the application namespace after restore.
The lab shows the namespace as my-app-namespace.
Step 2: Run the SCC assignment command:
oc adm policy add-scc-to-user anyuid -z default -n my-app-namespace
Step 3: Confirm the role binding is applied.
The lab output shows:
clusterrole.rbac.authorization.k8s.io/system:openshift:scc:anyuid added: "default" Detailed explanation:
After a restore, the application may fail if its pods require a security context not permitted by the default SCC allocation. This command grants the anyuid SCC to the default service account in the my-app-namespace project. The -z default syntax targets the default service account, which many restored workloads use if no custom service account is defined. The anyuid SCC allows containers to run with arbitrary user IDs, which some legacy or prebuilt images require. In OpenShift, SCC mismatches commonly cause pods to remain in pending or crash-related states. Assigning the proper SCC resolves those admission issues so workloads can start successfully. This step is therefore a post-restore operational fix to align security policy with application requirements.
Explanation:
Step 1: Identify the application namespace after restore.
The lab shows the namespace as my-app-namespace.
Step 2: Run the SCC assignment command:
oc adm policy add-scc-to-user anyuid -z default -n my-app-namespace
Step 3: Confirm the role binding is applied.
The lab output shows:
clusterrole.rbac.authorization.k8s.io/system:openshift:scc:anyuid added: "default" Detailed explanation:
After a restore, the application may fail if its pods require a security context not permitted by the default SCC allocation. This command grants the anyuid SCC to the default service account in the my-app-namespace project. The -z default syntax targets the default service account, which many restored workloads use if no custom service account is defined. The anyuid SCC allows containers to run with arbitrary user IDs, which some legacy or prebuilt images require. In OpenShift, SCC mismatches commonly cause pods to remain in pending or crash-related states. Assigning the proper SCC resolves those admission issues so workloads can start successfully. This step is therefore a post-restore operational fix to align security policy with application requirements.