All Practice Exams

100+ Free EX342 Practice Questions

Red Hat Certified Specialist in Containerized Services on OpenShift exam (EX342) practice questions are available now; exam metadata is being verified.

✓ No registration✓ No credit card✓ No hidden fees✓ Start practicing immediately
~55-70% (estimated based on similar Red Hat specialist exams) Pass Rate
100+ Questions
100% Free

Loading practice questions...

2026 Statistics

Key Facts: EX342 Exam

$400

Exam fee per attempt

Red Hat

210/300

Required passing score (70%)

Red Hat

3 hours

Exam duration (performance-based lab)

Red Hat

3 years

Certification validity before recertification

Red Hat

RHCA

EX342 counts as 1 of 5 specialist exams required

Red Hat

5

Core topic areas covering deployment, networking, config, storage, and security

Red Hat exam objectives

EX342 is a 3-hour hands-on OpenShift exam testing application deployment, TLS routing, RBAC, and stateful workloads. Pass with 210/300 to earn your specialist credential and advance toward RHCA.

Sample EX342 Practice Questions

Try these sample questions to test your EX342 exam readiness. Each question includes a detailed explanation. Start the interactive quiz above for the full 100+ question experience with AI tutoring.

1Which OpenShift CLI command deploys a containerized application directly from a Git repository using the Source-to-Image (S2I) strategy?
A.oc new-app https://github.com/myorg/myapp.git
B.oc deploy --git https://github.com/myorg/myapp.git
C.oc create app --source https://github.com/myorg/myapp.git
D.oc import-image https://github.com/myorg/myapp.git
Explanation: `oc new-app <git-url>` creates all necessary resources to build and deploy an application from source using S2I. OpenShift detects the language, selects an appropriate builder image, creates a BuildConfig, a DeploymentConfig (or Deployment), an ImageStream, and a Service. It is the primary command for getting new applications onto a cluster from source.
2A developer needs to expose a Deployment named `frontend` to external traffic on port 80 as a Route in OpenShift. What is the fastest way using the `oc` CLI?
A.oc expose deployment/frontend --port=80
B.oc route expose frontend --port=80
C.oc create route frontend --port=80
D.oc expose service/frontend && oc create route frontend
Explanation: `oc expose deployment/frontend --port=80` creates a ClusterIP Service and an HTTP Route for the deployment in one command. OpenShift automatically assigns a hostname based on the project name and cluster wildcard DNS. The `oc expose` command simplifies what would otherwise require separate `oc create service` and `oc create route` steps.
3In OpenShift, which resource type provides automated builds triggered by changes to a source code repository or base image?
A.BuildConfig
B.Deployment
C.ImageStream
D.Job
Explanation: A `BuildConfig` defines how OpenShift builds container images. It specifies the build strategy (S2I, Docker, or Custom), the source (Git, binary, Dockerfile), the output ImageStream tag, and triggers. Triggers can be configured to fire builds automatically when the source code changes (via webhooks) or when the base builder image is updated.
4Which `oc` command shows the current build status and streams the build log for a BuildConfig named `myapp`?
A.oc start-build myapp --follow
B.oc build logs myapp --follow
C.oc get buildconfig myapp --log
D.oc describe build myapp --stream
Explanation: `oc start-build myapp --follow` starts a new build and streams the log output. To view logs for an existing build without starting a new one, use `oc logs build/myapp-1`. The `--follow` flag streams the build log in real time until the build completes or fails.
5An OpenShift ConfigMap named `app-config` contains a key `database.url`. How do you inject this value as an environment variable named `DB_URL` into a Deployment?
A.Use valueFrom.configMapKeyRef in the Deployment's container env spec
B.Mount the ConfigMap as a volume and read the file at runtime
C.Use oc set env deployment/myapp --from=configmap/app-config/database.url
D.Directly reference the ConfigMap name in the container's env section without a key reference
Explanation: Using `valueFrom.configMapKeyRef` in the container's `env` section injects a specific ConfigMap key as an environment variable. The YAML snippet uses `name: DB_URL` for the env var and `valueFrom.configMapKeyRef: {name: app-config, key: database.url}`. This is the standard Kubernetes/OpenShift pattern for injecting individual config values as environment variables.
6Which OpenShift resource stores sensitive data such as TLS certificates, passwords, or API tokens in a base64-encoded (not encrypted by default) format?
A.Secret
B.ConfigMap
C.EncryptedConfig
D.Vault
Explanation: A `Secret` stores sensitive data in base64-encoded form. It is important to note that base64 is encoding, not encryption — Secrets are not encrypted at rest by default unless etcd encryption is enabled. Secrets can be mounted as files or injected as environment variables into containers.
7In OpenShift, what is the purpose of an ImageStream and ImageStreamTag?
A.An ImageStream is a pointer to container images that tracks versions via tags and can trigger deployments when images change
B.An ImageStream downloads and caches images from external registries to the internal registry
C.An ImageStream is a build strategy that streams images from source code
D.An ImageStreamTag replaces Docker Hub tags with OpenShift-managed tags
Explanation: An `ImageStream` is an OpenShift abstraction that tracks container images by tag, decoupling the image reference from the actual registry URL. When an ImageStreamTag is updated (by a build, import, or tag), deployments referencing it can be triggered to automatically roll out. This enables CI/CD pipelines where a new build automatically triggers a deployment.
8Which `oc` command creates a persistent storage claim of 5Gi using the `standard` StorageClass for a pod?
A.oc create pvc mypvc --storage-class=standard --size=5Gi
B.oc apply pvc --size 5Gi --class standard
C.oc new-storage --name mypvc --class standard --size 5Gi
D.oc provision pvc mypvc 5Gi standard
Explanation: `oc create pvc` with `--storage-class` and `--size` creates a PersistentVolumeClaim. Alternatively, you can apply a YAML manifest with `apiVersion: v1, kind: PersistentVolumeClaim`. The PVC requests dynamic provisioning from the `standard` StorageClass for 5Gi of storage. The actual PersistentVolume is provisioned by the storage backend.
9A container in OpenShift fails to start due to an `ImagePullBackOff` error. What is the most likely cause?
A.The container image cannot be pulled from the registry — either wrong credentials, wrong image name, or the image does not exist
B.The container's health check is failing
C.The node has insufficient memory to pull the image
D.The SecurityContextConstraint is preventing the image from being used
Explanation: `ImagePullBackOff` occurs when OpenShift fails to pull the container image from the registry. Common causes include: incorrect image name or tag, the image does not exist in the specified registry, missing or incorrect registry credentials (Secret not linked to ServiceAccount), or the registry is unreachable from the cluster.
10Which `oc` command scales a Deployment named `backend` to 5 replicas?
A.oc scale deployment/backend --replicas=5
B.oc set replicas backend=5
C.oc resize deployment backend --count 5
D.oc rollout scale backend 5
Explanation: `oc scale deployment/backend --replicas=5` changes the desired replica count for the named Deployment. OpenShift immediately begins creating or terminating pods to reach the target count. This works with Deployment, DeploymentConfig, ReplicaSet, StatefulSet, and Job resources.

About the EX342 Practice Questions

Verified exam format metadata for Red Hat Certified Specialist in Containerized Services on OpenShift exam (EX342) is pending. The practice questions above remain available while official exam length, timing, passing score, fee, and administrator details are reviewed.