[Aug 19, 2026] New 2026 RedHat EX380 Exam Dumps with PDF from VCEEngine (Updated 44 Questions) [Q12-Q30]

Share

New 2026 EX380 exam questions Welcome to download the newest VCEEngine EX380 PDF dumps (44 Q&As)

P.S. Free 2026 Red Hat OpenShift EX380 dumps are available on Google Drive shared by VCEEngine

NEW QUESTION # 12
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 # 13
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 # 14
GitOps and MachineConfig - Trigger Argo CD Synchronization by Repository Update

Answer:

Explanation:
See the solution below in Explanation:
Explanation:
Step 1: Confirm that the repository being pushed to is the same repository watched by the GitOps/Argo CD application.
This linkage is essential because GitOps acts only on configured source repositories and paths.
Step 2: Commit the MachineConfig changes.
The lab uses:
git commit -am "Add MachineConfig for motd"
Step 3: Push the changes to the tracked branch.
The lab uses:
git push origin main
Step 4: Allow Argo CD to detect the repository change and begin synchronization.
In a standard GitOps model, the controller compares the Git repository to the cluster state and applies drift correction or new desired resources.
Detailed explanation:
This sub Task SIMULATION is the operational purpose behind the previous Git command Task SIMULATION . The point is not merely to store a file in Git; it is to update the declarative source that Argo CD uses to reconcile the cluster. Once the repository is updated, Argo CD detects the new commit and syncs the MachineConfig into the cluster according to its application definition. This demonstrates a core automation principle in OpenShift GitOps: administrators do not treat the cluster as the primary editable surface. Instead, they modify Git and let the automation layer enforce state. That provides traceability, peer review potential, rollback capability, and consistency across environments.


NEW QUESTION # 15
Configure RBAC roles with users and groups
Task Information : Grant edit to group dev-team in namespace payments, and grant view to user auditor1.

Answer:

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


NEW QUESTION # 16
Configure log forwarding to an external endpoint
Task Information : Configure Cluster Logging to forward application logs to an external output using ClusterLogForwarder.

Answer:

Explanation:
See the solution below in Explanation:
Explanation:
* Verify logging namespace and resources
* oc get ns openshift-logging
* oc -n openshift-logging get clusterlogforwarder
* ClusterLogForwarder configures pipelines and outputs.
* Create/Edit ClusterLogForwarder (example structure)
* Define an output (external system) and pipeline selecting application logs.
* Apply via YAML:
* oc -n openshift-logging apply -f clusterlogforwarder.yaml
* Validate collector pods are healthy
* oc -n openshift-logging get pods
* Forwarding relies on collectors (vector/fluentd depending config).
* Generate a test log line
* oc -n openshift-logging run logger --image=busybox --restart=Never -- /bin/sh -c 'echo hello- forwarding; sleep 5'
* This creates a known message to search in the external endpoint.
* Confirm logs arrive at destination
* Use your external system's query/search to confirm hello-forwarding.


NEW QUESTION # 17
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 # 18
GitOps and MachineConfig - Push MachineConfig to Git

Answer:

Explanation:
See the solution below in Explanation:
Explanation:
Step 1: Make sure the MachineConfig YAML has already been created or modified in the local Git repository.
This Task assumes the file change is ready to be committed.
Step 2: Run the command:
git commit -am "Add MachineConfig for motd" & & git push origin main
Step 3: Verify the commit succeeds and the push goes to the main branch.
The lab output shows:
[main 8d32a1] Add MachineConfig for motd
Detailed explanation:
This Task is part of a GitOps workflow. Instead of manually applying changes directly to the cluster, the desired configuration is stored in Git, and a GitOps controller such as Argo CD synchronizes the cluster to match the repository state. The command commits all tracked modified files with the message Add MachineConfig for motd and then pushes the change to the main branch. In this model, Git becomes the source of truth. A MachineConfig is typically used to manage node-level operating system configuration in OpenShift, so pushing it through GitOps ensures the change is auditable, repeatable, and reconciled declaratively. If the commit does not include the intended YAML, the synchronization mechanism will not apply the desired change.


NEW QUESTION # 19
Spread replicas using podAntiAffinity
Task Information : Configure payments/api to prefer scheduling pods on different nodes.

Answer:

Explanation:
See the solution below in Explanation:
Explanation:
* Patch deployment with preferred podAntiAffinity
* oc -n payments patch deploy api --type=merge -p '{
* "spec":{"template":{"spec":{"affinity":{
* "podAntiAffinity":{
* "preferredDuringSchedulingIgnoredDuringExecution":[{
* "weight":100,
* "podAffinityTerm":{
* "labelSelector":{"matchLabels":{"app":"api"}},
* "topologyKey":"kubernetes.io/hostname"
* }
* }]
* }
* }}}}
* }'
* Encourages spread across nodes to reduce single-node impact.
* Verify spread
* oc -n payments get pods -o wide


NEW QUESTION # 20
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 # 21
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 # 22
Create and use client certificates with kubeconfig (CSR flow)
Task Information : Generate a client key/CSR for audit2, approve it, extract the signed cert, and build a kubeconfig using that cert.

Answer:

Explanation:
See the solution below in Explanation:
Explanation:
* Generate private key and CSR
* openssl genrsa -out audit2.key 2048
* openssl req -new -key audit2.key -out audit2.csr -subj "/CN=audit2/O=auditors"
* CN becomes username; O can map to groups in some setups.
* Base64 encode CSR for the API object
* CSR=$(base64 -w0 audit2.csr)
* Kubernetes CSR object expects base64-encoded request data.
* Create the CSR object
* cat < < EOF | oc apply -f -
* apiVersion: certificates.k8s.io/v1
* kind: CertificateSigningRequest
* metadata:
* name: audit2-csr
* spec:
* request: ${CSR}
* signerName: kubernetes.io/kube-apiserver-client
* usages:
* - client auth
* EOF
* Approve the CSR
* oc adm certificate approve audit2-csr
* Approval triggers certificate issuance.
* Extract the signed certificate
* oc get csr audit2-csr -o jsonpath='{.status.certificate}' | base64 -d > audit2.crt
* Produces the client certificate file.
* Build kubeconfig using cert/key
* oc config set-credentials audit2 \
* --client-certificate=audit2.crt --client-key=audit2.key \
* --embed-certs=true --kubeconfig=audit2.kubeconfig
* oc config set-cluster lab \
* --server="$(oc whoami --show-server)" \
* --insecure-skip-tls-verify=true \
* --kubeconfig=audit2.kubeconfig
* oc config set-context audit2 \
* --cluster=lab --user=audit2 --namespace=default \
* --kubeconfig=audit2.kubeconfig
* Creates a kubeconfig that authenticates using client certificates.
* Test
* oc --kubeconfig=audit2.kubeconfig get ns


NEW QUESTION # 23
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 # 24
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 # 25
Add a second Identity Provider (HTPasswd) alongside LDAP
Task Information : Configure multiple identity providers by adding an HTPasswd IDP without removing the existing LDAP IDP.

Answer:

Explanation:
See the solution below in Explanation:
Explanation:
* Create a local htpasswd file with a test user
* htpasswd -c -B -b /tmp/htpass.txt testuser RedHat123!
* -c creates a new file (use only once).
* -B uses bcrypt hashing (recommended).
* -b supplies password non-interactively (good for labs).
* Create the HTPasswd secret in openshift-config
* oc -n openshift-config create secret generic htpass-secret --from-file=htpasswd=/tmp/htpass.txt
* OAuth reads the htpasswd key from this secret.
* Edit OAuth and add the HTPasswd provider (keep LDAP intact)
* oc edit oauth cluster
Add another entry under spec.identityProviders:
- name: local-htpasswd
mappingMethod: claim
type: HTPasswd
htpasswd:
fileData:
name: htpass-secret
* This adds a second login option while preserving LDAP.
* Restart OAuth pods
* oc -n openshift-authentication delete pod -l app=oauth-openshift
* Ensures the updated list of identity providers is loaded.
* Verify login works for htpasswd user
* Log in via console using testuser.
* Confirm the user is created:
* oc get user testuser


NEW QUESTION # 26
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 # 27
Kubeconfig Management - Set Context in Kubeconfig

Answer:

Explanation:
See the solution below in Explanation:
Explanation:
Step 1: Verify the cluster name, namespace, and user name that should be referenced.
The lab uses cluster api-ocp4-example-com:6443, namespace audit-ns, and user audit-sa.
Step 2: Run the command:
oc config set-context audit --cluster api-ocp4-example-com:6443 --namespace audit-ns --user audit-sa -- kubeconfig audit.config Step 3: Confirm context creation.
The lab output shows:
Context "audit" created.
Detailed explanation:
A kubeconfig context ties together three things: a cluster endpoint, a user identity, and optionally a default namespace. This Task creates a context named audit in the file audit.config. Contexts are useful because they simplify repeated administration by letting the user switch between prepared working environments instead of re-entering cluster and namespace details each time. The namespace portion is especially helpful for project- scoped operations, because commands run under that context default to the chosen namespace. Accuracy matters here: if the user name in the context does not match the credentials entry or the cluster name does not exist in the kubeconfig, the context will not function as intended.


NEW QUESTION # 28
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 # 29
......

EX380 exam questions from VCEEngine dumps: https://actualtests.vceengine.com/EX380-vce-test-engine.html (44 Q&As)