PDF Download Free of EX380 Valid Practice Test Questions [Q25-Q43]

Share

PDF Download Free of EX380 Valid Practice Test Questions

EX380 Test Engine files, EX380 Dumps PDF


RedHat EX380 Exam Syllabus Topics:

TopicDetails
Topic 1
  • Configure and manage OpenShift Authentication and Identities: Covers integrating OpenShift with external identity providers like LDAP and Keycloak, managing RBAC, group synchronization, and kubeconfig-based authentication.
Topic 2
  • Implement OpenShift GitOps: Covers deploying and configuring Argo CD with the GitOps operator to manage both cluster administration and application delivery through Git-based pipelines and integrations.
Topic 3
  • Provision and inspect cluster logging: Covers deploying and configuring OpenShift logging with Vector and Loki, forwarding logs externally, querying logs, and diagnosing logging issues.
Topic 4
  • Manage workloads with cluster partitioning: Covers dedicating cluster nodes to specific workloads by configuring node pools, machine configurations, and special-purpose operators.

 

NEW QUESTION # 25
Create and use a service account token via kubeconfig
Task Information : Create SA ci-bot in ci namespace and generate a kubeconfig that authenticates using its token.

Answer:

Explanation:
See the solution below in Explanation:
Explanation:
* Create namespace and service account
* oc new-project ci
* oc -n ci create sa ci-bot
* The SA will represent automation access.
* Grant permissions (example: edit in namespace)
* oc -n ci policy add-role-to-user edit system:serviceaccount:ci:ci-bot
* Without permissions, token auth succeeds but API actions are denied.
* Generate token (TokenRequest)
* TOKEN=$(oc -n ci create token ci-bot)
* OCP issues a short-lived token by default (good practice).
* Create kubeconfig using the token
* oc config set-cluster lab --server="$(oc whoami --show-server)" \
* --insecure-skip-tls-verify=true --kubeconfig=ci-bot.kubeconfig
* oc config set-credentials ci-bot --token="$TOKEN" --kubeconfig=ci-bot.kubeconfig
* oc config set-context ci --cluster=lab --user=ci-bot --namespace=ci \
* --kubeconfig=ci-bot.kubeconfig
* oc config use-context ci --kubeconfig=ci-bot.kubeconfig
* This produces a self-contained kubeconfig for CI automation.
* Test access
* oc --kubeconfig=ci-bot.kubeconfig get pods


NEW QUESTION # 26
Configure BackupStorageLocation and VolumeSnapshotLocation
Task Information : Configure OADP/Velero storage locations and confirm they show as Available.

Answer:

Explanation:
See the solution below in Explanation:
Explanation:
* Create a secret for cloud credentials (S3-compatible example)
* oc -n openshift-adp create secret generic cloud-credentials \
* --from-file=cloud=/path/to/credentials
* Velero uses this secret to authenticate to object storage.
* Create/Update the DataProtectionApplication (DPA)
* Apply a DPA CR that defines:
* backupLocations (bucket, endpoint URL, region, etc.)
* snapshotLocations (if using snapshots)
* Verify BackupStorageLocation and SnapshotLocation
* velero backup-location get
* velero snapshot-location get
* Status should be Available, meaning storage config is valid.
==========


NEW QUESTION # 27
Dedicate nodes to a workload using labels and nodeSelector
Task Information : Label two nodes with workload=payments and schedule a deployment only onto those nodes.

Answer:

Explanation:
See the solution below in Explanation:
Explanation:
* Label the chosen worker nodes
* oc label node worker-1 workload=payments
* oc label node worker-2 workload=payments
* Node labels are key/value metadata used by the scheduler.
* Add a nodeSelector to the deployment
* oc -n payments patch deploy api --type=merge -p '{
* "spec":{"template":{"spec":{"nodeSelector":{"workload":"payments"}}}}
* }'
* Forces pods to schedule only to nodes that match the label.
* Verify placement
* oc -n payments get pods -o wide
* Confirms pods are running on the intended nodes.


NEW QUESTION # 28
Create a full application backup (resources + PV data)
Task Information : Create a Velero backup of namespace orders including PV snapshots.

Answer:

Explanation:
See the solution below in Explanation:
Explanation:
* Confirm resources and PVCs exist
* oc -n orders get all
* oc -n orders get pvc
* Ensures there is something meaningful to back up.
* Create backup including volume snapshots
* velero backup create orders-full --include-namespaces orders --snapshot-volumes
* Captures Kubernetes objects and requests PV snapshots where supported.
* Check status/details
* velero backup describe orders-full --details
* velero backup logs orders-full
* Review warnings/errors and confirm snapshot actions.


NEW QUESTION # 29
Restore application into same namespace
Task Information : Restore from backup orders-full and validate the app resources return.

Answer:

Explanation:
See the solution below in Explanation:
Explanation:
* Start the restore
* velero restore create orders-restore --from-backup orders-full
* Monitor restore status
* velero restore get
* velero restore describe orders-restore --details
* Validate restored resources
* oc -n orders get all
* oc -n orders get pvc
* Ensure deployments/pods/services and PVCs exist and pods become Running.


NEW QUESTION # 30
Create an Argo CD Application (OpenShift GitOps)
Task Information : Create an Argo CD Application that syncs from Git into namespace gitops-demo with automated sync enabled.

Answer:

Explanation:
See the solution below in Explanation:
Explanation:
* Create target namespace
* oc new-project gitops-demo
* Destination must exist (unless Argo is configured to auto-create).
* Create Application manifest
* apiVersion: argoproj.io/v1alpha1
* kind: Application
* metadata:
* name: demo-app
* namespace: openshift-gitops
* spec:
* project: default
* source:
* repoURL: https://git.example.com/org/repo.git
* targetRevision: main
* path: manifests/demo
* destination:
* server: https://kubernetes.default.svc
* namespace: gitops-demo
* syncPolicy:
* automated:
* prune: true
* selfHeal: true
* automated: enables auto sync.
* prune: removes deleted objects from Git.
* selfHeal: corrects drift.
* Apply Application
* oc apply -f demo-app.yaml
* Verify sync health
* oc -n openshift-gitops get application demo-app -o yaml | grep -i -E "sync|health" -n
* oc -n gitops-demo get all


NEW QUESTION # 31
Kubeconfig Management - Use Context

Answer:

Explanation:
See the solution below in Explanation:
Explanation:
Step 1: Make sure the context already exists in the kubeconfig file.
This follows the context creation Task SIMULATION .
Step 2: Run the command:
oc config use-context audit --kubeconfig audit.config
Step 3: Confirm the active context switches successfully.
The lab output shows:
Switched to context "audit".
Detailed explanation:
This command activates the audit context inside the specified kubeconfig file. Once selected, subsequent oc commands using that kubeconfig will default to the cluster, user, and namespace associated with that context.
This is operationally important because many administration mistakes come from running commands against the wrong cluster or project. Using explicit context switching reduces that risk and makes the kubeconfig usable for the intended audit workflow. In exams and real environments alike, the context is what turns separate kubeconfig elements into a working session configuration. Without switching to the correct context, even a well-formed kubeconfig may not be used as expected.


NEW QUESTION # 32
Recover a NotReady worker node (basic remediation workflow)
Task Information : Diagnose a NotReady worker node and restore it to Ready state using standard OpenShift admin workflow.

Answer:

Explanation:
See the solution below in Explanation:
Explanation:
* Identify failing node and status
* oc get nodes
* Confirms which node is NotReady.
* Inspect node conditions and events
* oc describe node < worker >
* Shows kubelet condition issues (network, disk pressure, runtime, etc.).
* Check MachineConfigPool state
* oc get mcp
* oc describe mcp worker
* If MCP is degraded, node may be stuck applying a config.
* Check node logs (kubelet)
* oc adm node-logs < worker > --path=kubelet.log
* Often reveals why node isn't reporting Ready.
* Remediate based on symptom
* Examples:
* If out of disk: free space, then verify kubelet recovers.
* If stuck MCO: investigate current/desired config and fix broken MachineConfig.
* If node cordoned/drained incorrectly: uncordon after remediation.
* oc adm uncordon < worker >
* Confirm node returns Ready
* oc get node < worker >


NEW QUESTION # 33
Export and import container images (mirror to internal registry)
Task Information : Pull an image from an external registry, push it into the OpenShift internal registry, and update a deployment to use the mirrored image.

Answer:

Explanation:
See the solution below in Explanation:
Explanation:
* Log in to OpenShift internal registry
* oc registry login
* Allows podman to push to the internal registry.
* Pull external image
* podman pull docker.io/library/nginx:1.25
* Gets the image locally.
* Tag for internal registry destination
* podman tag nginx:1.25 image-registry.openshift-image-registry.svc:5000/orders/nginx:1.25
* Uses the cluster service DNS name (works inside cluster network).
* Push to internal registry
* podman push image-registry.openshift-image-registry.svc:5000/orders/nginx:1.25
* Update deployment to use internal image
* oc -n orders set image deploy/web web=image-registry.openshift-image-registry.svc:5000/orders/nginx:
1.25
* Verify rollout
* oc -n orders rollout status deploy/web
* oc -n orders get pods -o wide


NEW QUESTION # 34
Export and import a Kubernetes application (YAML export)
Task Information : Export typical app objects from orders and apply them into a new namespace orders- copy.

Answer:

Explanation:
See the solution below in Explanation:
Explanation:
* Export objects to YAML
* oc -n orders get deploy,svc,route,cm,secret -o yaml > orders-app.yaml
* Exports key application resources.
* Create target namespace
* oc new-project orders-copy
* Apply exported YAML
* oc -n orders-copy apply -f orders-app.yaml
* Recreates resources (some fields may need adjustment, like namespaces or immutable fields).
* Validate
* oc -n orders-copy get all


NEW QUESTION # 35
Install OADP Operator and verify Velero components
Task Information : Install the OADP operator and confirm Velero pods/components are running.

Answer:

Explanation:
See the solution below in Explanation:
Explanation:
* Install OADP via Web Console
* Operators # OperatorHub # search OADP / OpenShift API for Data Protection # Install
* Explanation: This operator manages Velero and backup integrations.
* Verify the operator CSV is installed
* oc get csv -A | grep -i -E "oadp|data protection|velero"
* Confirms installation succeeded.
* Verify pods in the OADP namespace (commonly openshift-adp)
* oc get pods -n openshift-adp
* You should see Velero/OADP-related pods in Running state.


NEW QUESTION # 36
Kubeconfig Management - Set Credentials in Kubeconfig

Answer:

Explanation:
See the solution below in Explanation:
Explanation:
Step 1: Ensure the client certificate and private key files are available.
The lab uses audit.crt and tls.key.
Step 2: Run the command:
oc config set-credentials audit --client-certificate audit.crt --client-key tls.key --embed-certs --kubeconfig audit.config Step 3: Confirm the user entry is written.
The lab output shows:
User "audit" set.
Detailed explanation:
This command creates or updates the audit user entry inside the kubeconfig file audit.config. It points the user to a client certificate and private key, and the --embed-certs option stores certificate material directly inside the kubeconfig rather than only referencing external files. That makes the kubeconfig more portable because it can be moved and used without separately copying the certificate files, provided the embedded content is valid. In certificate-based authentication, the private key proves client possession while the certificate presents the approved identity. If the certificate and key do not match, authentication will fail. This step does not yet define what cluster or namespace the user works against; it only defines the credential identity.


NEW QUESTION # 37
Backup and Restore - Fix SCC for Restored Application

Answer:

Explanation:
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.


NEW QUESTION # 38
Logging Configuration - Configure ClusterLogging in Web Console

Answer:

Explanation:
See the solution below in Explanation:
Explanation:
Step 1: Log in to the OpenShift web console.
This Task is explicitly defined as a GUI workflow.
Step 2: Navigate to Operators .
Installed logging components are managed through the operator framework.
Step 3: Open Installed Operators .
This lists operators already deployed in the cluster.
Step 4: Select Red Hat OpenShift Logging .
This operator manages the cluster logging stack and its custom resources.
Step 5: Open the ClusterLogging instance.
The Task SIMULATION refers to editing the existing ClusterLogging custom resource.
Step 6: Switch to YAML View .
This allows direct editing of the logging custom resource specification.
Step 7: Edit the collection type and set it to vector.
This changes the log collector implementation.
Step 8: Click Save .
The operator will reconcile the resource and apply the updated collector configuration.
Detailed explanation:
The ClusterLogging custom resource controls the logging stack behavior in OpenShift. Changing the collection type to vector updates which collector technology is used for gathering node and container logs. In operator-managed platforms, direct YAML edits to the custom resource are the preferred method for changing managed behavior because the operator then applies and maintains the desired state. This Task tests both navigation skills in the web console and knowledge of where logging behavior is configured. Saving the resource triggers reconciliation, which is a core OpenShift operator pattern: the declared configuration is read and enforced by the operator rather than by manual per-pod changes.


NEW QUESTION # 39
Identity Management - Create CA ConfigMap

Answer:

Explanation:
See the solution below in Explanation:
Explanation:
Step 1: Ensure the certificate file rhds_ca.crt is available in your current working directory or use the correct path.
The Task requires creating a configmap from this CA certificate file.
Step 2: Run the command:
oc create configmap rhds-ca-config-map --from-file ca.crt=rhds_ca.crt -n openshift-config Step 3: Confirm the configmap is created.
The lab output shows:
configmap/rhds-ca-config-map created
Detailed explanation:
This creates a configmap named rhds-ca-config-map in the openshift-config namespace and maps the local file rhds_ca.crt to the key name ca.crt inside the configmap. This is important in external identity integration because OpenShift may need to trust a custom certificate authority when communicating with LDAP or another secured external service. By placing the certificate in a configmap, the authentication operator or related cluster configuration can reference it cleanly. The key name matters because many OpenShift resources expect a CA bundle key with a specific filename-like convention. If the file path is wrong, the command fails immediately. If the configmap name or key mapping is wrong, the authentication provider referencing it may not trust the external endpoint.


NEW QUESTION # 40
Service Accounts and RBAC - Create Audit Service Account

Answer:

Explanation:
See the solution below in Explanation:
Explanation:
Step 1: Ensure the target project exists.
The lab specifies the namespace/project auth-audit.
Step 2: Run the command:
oc create sa audit -n auth-audit
Step 3: Verify creation.
The lab output shows:
serviceaccount/audit created
Detailed explanation:
This creates a service account named audit in the auth-audit namespace. Service accounts provide non-human identities for workloads and automation processes running inside the cluster. They are also commonly used when controlled API access is needed for scripts, jobs, or external kubeconfig generation. Creating a dedicated service account instead of using the default one is good practice because it supports least privilege and clearer access tracking. In exam and administration scenarios, service accounts are often paired with explicit RBAC bindings to grant only the permissions needed for the intended Task SIMULATION . This step lays the identity foundation before assigning a role in the following Task SIMULATION .


NEW QUESTION # 41
Prevent workloads from running on dedicated nodes (taints)
Task Information : Apply a taint to dedicated nodes so only pods with tolerations can run there.

Answer:

Explanation:
See the solution below in Explanation:
Explanation:
* Taint nodes
* oc adm taint nodes worker-1 dedicated=payments:NoSchedule
* oc adm taint nodes worker-2 dedicated=payments:NoSchedule
* NoSchedule blocks new pods that do not tolerate the taint.
* Confirm taints
* oc describe node worker-1 | grep -i taints -A2
* Ensures taints are present.
* Validate effect
* A normal deployment without tolerations will remain Pending if it can only land on those tainted nodes.


NEW QUESTION # 42
......

Pass Your Red Hat OpenShift EX380 Exam on Sep 14, 2026 with 44 Questions: https://actual4test.practicetorrent.com/EX380-practice-exam-torrent.html