Red Hat Certified OpenShift Application Developer Free Sample Questions

12 free sample questions120 in the full practice test

Try simulator

EX288 Sample Questions

  1. Question 1

    Intermediate

    Work with OpenShift Pipelines · Design and define, and troubleshoot CI/CD workflows for applications

    You are configuring a Red Hat OpenShift Pipeline (Tekton) to build and deploy a Java application. The pipeline consists of two tasks: build-app (which compiles the code using Maven) and build-image (which uses Buildah to create a container image). The build-app task produces a JAR file that the build-image task requires. However, the build-image task fails immediately, stating the JAR file cannot be found. You have verified the JAR is successfully created in the first task.

    Which configuration is required to persist and share files between these two tasks?

    Answer and explanation

    Correct answer: A

    In Tekton/OpenShift Pipelines, tasks run in separate pods. The filesystem is not shared by default. To share artifacts (like a compiled JAR) between tasks, you must define a Workspace in the Pipeline definition and bind it to a storage volume (like a PVC) at runtime via the PipelineRun. Both tasks then mount this workspace to read/write shared files.

  2. Question 2

    Intermediate

    Work with the source-to-image (S2I) framework · Customize existing S2I builder images

    A developer is customizing a Source-to-Image (S2I) build for a Python application. The application requires a specific configuration file to be generated dynamically based on environment variables before the application starts, but after the dependencies are installed. The developer decides to provide a custom S2I script in the source repository.

    Which script must the developer create, and where should it be placed in the source code repository to override the default behavior?

    Answer and explanation

    Correct answer: C

    The assemble script is responsible for building the application artifacts (installing dependencies, compiling code, etc.). By placing an executable script named assemble in the .s2i/bin/ directory of the source code, the S2I process will use this script instead of the default one provided by the builder image. This allows the developer to inject custom build steps like generating configuration files.

  3. Question 3

    Intermediate

    Work with Red Hat OpenShift Container Platform · Use application health monitoring

    You are deploying a legacy Java application that takes approximately 90 seconds to initialize and accept connections. You configure a Liveness probe to check the endpoint /healthz every 10 seconds. During deployment, you observe that the Pod enters a CrashLoopBackOff state because the Liveness probe fails before the application is ready.

    Which configuration change is the BEST practice to resolve this issue without compromising the ongoing failure detection capability?

    Answer and explanation

    Correct answer: B

    A startupProbe disables the liveness and readiness checks until it succeeds. This is ideal for slow-starting legacy applications. It allows you to give the app a long time to start (e.g., 90s) without delaying the reaction time of the Liveness probe once the app is actually running. Increasing initialDelaySeconds on the Liveness probe is a static guess; a startupProbe is dynamic and more robust.

  4. Question 4

    Beginner

    Deploy multi-container applications · Create and use Helm charts

    A developer needs to deploy an application to OpenShift using a Helm chart. The chart is stored in a local directory named ./my-chart. The developer wants to install the chart into the frontend project with the release name web-ui, setting the replica count to 3 via the command line.

    Which command achieves this?

    Answer and explanation

    Correct answer: D

    The correct syntax for installing a local chart is helm install . The --namespace (or -n) flag targets the project/namespace, and --set overrides values in values.yaml.

  5. Question 5

    Intermediate

    Deploy multi-container applications · Customizing deployments with Kustomize

    You are managing a microservices application using Kustomize. You have a base directory containing the common resources and an overlays/prod directory for production-specific changes. You want to add a prefix prod- to all resources deployed from the production overlay and apply a common label env: prod.

    Which fields should you add to the kustomization.yaml file in the overlays/prod directory?

    Answer and explanation

    Correct answer: C

    In Kustomize, namePrefix prepends a string to the names of all resources, and commonLabels adds labels to all resources and selectors. This is the standard way to differentiate environments in an overlay.

  6. Question 6

    Beginner

    Work with configuration maps · Create secret resources

    You need to create a Kubernetes Secret from a local file named db-creds.json to be used by a Pod. The key in the secret should be credentials.

    Which command will create this secret in the current project?

    Answer and explanation

    Correct answer: D

    The oc create secret generic command creates a generic secret. The --from-file=key=path syntax allows you to map a specific key ('credentials') to the content of a local file ('db-creds.json').

Register free for 6 more questions

Or unlock all 120 EX288 questions with explanations, timed mode and flashcards.