Red Hat Certified Technologist in OpenShift Exam Free Sample Questions

Description

Covers managing OpenShift with the CLI and web UI, collecting cluster support data, deploying applications from images and templates, externalizing configuration and storage, and health probes.

12 free sample questions150 in the full practice test

Try simulator

EX180 Sample Questions

  1. Question 1

    Beginner

    Manage OpenShift Container Platform · Install and configure the OpenShift CLI tool

    A new DevOps engineer at FinTechCorp needs to access an OpenShift Container Platform 4.22 cluster. They have downloaded the oc CLI tool and have been provided with an API URL and credentials. Which of the following commands is the correct way to authenticate to the cluster and establish a new context in their kubeconfig file?

    Answer and explanation

    Correct answer: B

    The correct command to authenticate to an OpenShift cluster using the CLI is oc login. You specify the API server URL and can optionally pass the username with -u. This command prompts for a password and automatically updates the kubeconfig file with the new cluster context and authentication token. The other commands are syntactically incorrect or do not exist in the OpenShift CLI.

  2. Question 2

    Intermediate

    Manage OpenShift Container Platform · Install and configure the OpenShift CLI tool

    A system administrator is managing multiple OpenShift clusters (development, staging, and production). They need to switch their current CLI session from the development cluster to the production cluster. They already authenticated to both clusters earlier today. Which command should they use to seamlessly switch their active context?

    Answer and explanation

    Correct answer: C

    The oc config use-context command allows you to switch between different contexts stored in your kubeconfig file. A context is a combination of a cluster, a user, and a namespace. Since the administrator is already authenticated, switching the context instantly points their CLI to the production cluster without needing to log in again.

  3. Question 3

    Intermediate

    Manage OpenShift Container Platform · Inspect Kubernetes resources using both the CLI and the Web UI

    While writing a complex YAML manifest for a DeploymentConfig in OpenShift 4.22, a developer forgets the exact structure and accepted parameters for the strategy field. Which OpenShift CLI command provides the most direct, built-in documentation for this specific resource field without leaving the terminal?

    Answer and explanation

    Correct answer: B

    The oc explain command is designed specifically to explore the API documentation of Kubernetes and OpenShift resources directly from the CLI. By typing oc explain DeploymentConfig.spec.strategy, the developer will see a description of the field, its type, and its nested sub-fields.

  4. Question 4

    Advanced

    Manage OpenShift Container Platform · Inspect Kubernetes resources using both the CLI and the Web UI

    You are troubleshooting a pod named payment-gateway-7b99c5 that is stuck in a CrashLoopBackOff state. You need to identify the specific exit code of the last terminated container and the exact reason it failed. Which CLI command will provide this detailed historical status information?

    Answer and explanation

    Correct answer: A

    The oc describe pod command provides a detailed, human-readable overview of the pod's lifecycle. Under the 'Containers' section, it shows the 'State' (current) and 'Last State' (previous), which includes the exact Exit Code and Reason for the termination that caused the CrashLoopBackOff. While oc logs --previous shows the logs, it does not explicitly state the container exit code.

    flowchart TD A[Pod in CrashLoopBackOff] --> B{What information is needed?} B -->|Application Output| C[oc logs --previous] B -->|Exit Code & State| D[oc describe pod] D --> E[Look at 'Last State' section]
  5. Question 5

    IntermediateMultiple answers

    Manage OpenShift Container Platform · Inspect Kubernetes resources using both the CLI and the Web UI

    A developer needs to export the current configuration of an OpenShift Service named frontend-svc into a YAML file to store in version control, but they want to exclude cluster-specific metadata (like resourceVersion and uid). Which TWO commands or combinations can achieve this? (Select TWO)

    Answer and explanation

    Correct answers: A, D

    oc get svc frontend-svc -o yaml prints the whole Service as YAML. The yq del(...) filter then removes cluster-set fields such as resourceVersion and uid, so the saved file is clean.

    oc get svc frontend-svc -o yaml saves the whole Service as YAML. You then delete cluster-set fields such as resourceVersion, uid and status by hand. The old oc export command no longer exists.

  6. Question 6

    Beginner

    Manage OpenShift Container Platform · Collect cluster support data from an OpenShift cluster for Red Hat support

    A cluster administrator is experiencing intermittent network connectivity issues across multiple worker nodes in an OpenShift 4.22 cluster. They decide to open a support case with Red Hat. Which command is specifically designed to collect the comprehensive diagnostic data required by Red Hat Support?

    Answer and explanation

    Correct answer: C

    oc adm must-gather collects the data that Red Hat Support needs. It runs a pod that gathers resource definitions and service logs from the whole cluster. You compress the output directory and attach it to the case.

Register free for 6 more questions

Or unlock all 150 EX180 questions with explanations, timed mode and flashcards.