EX288 Red Hat Certified OpenShift Application Developer Practice Questions
Prepare for EX288 with more than an answer.
- Exam fee
- $500 USD
- Time limit
- 240 minutes
- Level
- Advanced Developer (Cloud-native Applications track)
- Valid for
- 3 years
Domains covered on the exam 11
- Work with Red Hat OpenShift Container Platform
- Deploy multi-container applications
- Work with container images in OpenShift Container Platform
- Troubleshoot application builds and deployment issues
- Work with image streams
- Work with configuration maps and secrets
- Work with the source-to-image (S2I) framework
- Work with build hooks and build triggers
- Work with templates
- Work with OpenShift Pipelines
- Work with Operators accessible for users to run in their applications
- 1
You are troubleshooting a build failure in OpenShift. The build named
frontend-1failed. You suspect the issue is related to a script error during the assembly phase.Which command would most effectively help you identify the specific error line in the build output?
Show answer details
Correct answer: D
oc logs build/frontend-1prints the full build output. It includes the messages of the S2Iassemblescript and the line that failed.oc describe buildshows the status and at most the last few log lines. - 2
You have a Deployment named
payment-servicethat mounts a ConfigMap namedpayment-configas a volume at/etc/config. You update the data in thepayment-configConfigMap to change a timeout value.What happens to the Pods controlled by the Deployment after this update?
Show answer details
Correct answer: B
Files from a mounted ConfigMap are updated in the pod after a short delay. The pod does not restart. The application must read the file again, or you restart the pods with
oc rollout restart. - 3
Case Study: TechCorp Inc.
TechCorp is migrating a monolithic Node.js application to OpenShift. The application code resides in a private Git repository. The build process requires fetching dependencies from a private npm registry which requires authentication. The developers want to use the standard Node.js S2I builder image but need to provide a
.npmrcfile containing the authentication token during the build process.Requirement: The
.npmrcfile contains sensitive tokens and should NOT be committed to the source code repository. It must be injected securely during the build.Which solution meets these requirements?
Show answer details
Correct answer: B
Secrets listed under
spec.source.secretsare copied into the source directory beforeassembleruns.npm installcan then read.npmrc. S2I empties these files afterassemble, so the token is not left in the image. - 4
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) andbuild-image(which uses Buildah to create a container image). Thebuild-apptask produces a JAR file that thebuild-imagetask requires. However, thebuild-imagetask 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 share files between these two tasks?
Show answer details
Correct answer: A
Each Task runs in its own pod, so files are not shared by default. A Pipeline workspace bound to a PVC in the PipelineRun gives both Tasks the same storage. Results hold only small strings, not files.
- 5
A developer is customizing a Source-to-Image (S2I) build for a Python application. During the image build, right after the dependencies are installed, a configuration file must be generated from build environment variables, so that the file is part of the final image. 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?
Show answer details
Correct answer: D
The
assemblescript runs during the build and installs the dependencies. A custom.s2i/bin/assemblecan call the original script and then generate the file. Therunscript runs only when a container starts. - 6
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
/healthzevery 10 seconds. During deployment, you observe that the Pod enters aCrashLoopBackOffstate 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?
Show answer details
Correct answer: D
A startup probe holds back the liveness probe until the app first answers. The 90-second start then causes no restarts. After that, the liveness probe checks every 10 seconds as before. A longer initial delay is only a fixed guess.
