SIMULATIONTask SIMULATION 11Kubeconfig Management – Use Context
Answer(s): A
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.configStep 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.
SIMULATIONTask SIMULATION 12 Logging Configuration – Configure ClusterLogging in Web Console
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.
SIMULATIONTask SIMULATION 13 GitOps and MachineConfig – Push MachineConfig to Git
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 mainStep 3: Verify the commit succeeds and the push goes to the main branch. The lab output shows: [main 8d32a1] Add MachineConfig for motdDetailed 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.
SIMULATIONTask SIMULATION 14 GitOps and MachineConfig – Trigger Argo CD Synchronization by Repository Update
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 mainStep 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 subTask 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.
SIMULATIONTask SIMULATION 1Integrate OpenShift with LDAP (create LDAP identity provider)Task Information: Configure cluster OAuth to add an LDAP identity provider using an existing bind secret and CA ConfigMap, then verify login works.
Verify prerequisites exist (Secret + ConfigMap)oc -n openshift-config get secret rhds-ldap-secret oc -n openshift-config get configmap rhds-ca-config-mapOAuth LDAP configuration references these objects. If they don’t exist, OAuth won’t be able to bind to LDAP securely.Edit the cluster OAuth resource oc edit oauth clusterThe oauth/cluster resource is where identity providers are defined.Add an LDAP identity provider entry (example structure) Add under spec.identityProviders:- name: corp-ldap mappingMethod: claim type: LDAPldap:url: "ldaps://ldap.example.com:636/ou=People,dc=example,dc=com?uid"bindDN: "uid=openshift,ou=svc,dc=example,dc=com"bindPassword:name: rhds-ldap-secret ca:name: rhds-ca-config-map insecure: false attributes:id: ["dn"]name: ["cn"]preferredUsername: ["uid"]email: ["mail"]url: where to search for users and which attribute is used for login (here uid).bindDN + bindPassword: service account used for LDAP queries.ca: trusts the LDAP server CA for TLS.attributes: maps LDAP data into OpenShift user identity fields.Restart OAuth pods to load changes quickly oc -n openshift-authentication delete pod -l app=oauth-openshiftThis forces pods to restart and re-read the updated configuration.Verify the identity provider appears and users can log inIn the web console login page, you should see the new provider (name may show as corp-ldap).After a successful login, confirm user objects appear:oc get users oc get identitiesOpenShift creates User and Identity objects upon first successful authentication.==========
Post your Comments and Discuss RedHat EX380 exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the EX380 content, but please register or login to continue.