Free practice · No sign-up required

Red Hat Certified OpenShift Application Developer free practice test

15 questions with answer explanations. Choose an answer below to begin.

Question 1 of 15

Which resource definition is required to deploy a containerized application on OpenShift?

Show hint

Define and manage application deployments

0/15 answered · Bookmark questions to review later. Focus the practice area to use keys 1–9 and Enter.

Learn by doing

Put your answers into practice

Use official documentation and hands-on labs to work through topics you missed.

Explore all study resources →

All questions and explanations

Prefer to read at your own pace? Work through each question below, then open its answer to check your reasoning. You can link directly to a question or print this reference.

  1. Which resource definition is required to deploy a containerized application on OpenShift?

    1. DeploymentConfig

    2. Service

    3. Route

    4. ConfigMap

    Show answer and explanation

    Correct answer

    • DeploymentConfig

    A DeploymentConfig specifies how to run the application and manages the lifecycle of pods. Services, Routes, and ConfigMaps support networking and configuration but do not define how to run the application.

  2. What is the purpose of a BuildConfig in OpenShift?

    1. To define how source code is built into an image

    2. To expose services externally

    3. To store application secrets

    4. To manage persistent storage

    Show answer and explanation

    Correct answer

    • To define how source code is built into an image

    A BuildConfig describes the build process, including source, strategy, and output image. It automates building container images from source code. Other options relate to networking, secrets, and storage resources.

  3. Which command updates a running container image to a new version in OpenShift?

    1. oc set image

    2. oc rollout

    3. oc apply

    4. oc patch

    Show answer and explanation

    Correct answer

    • oc set image

    The oc set image command updates the container image for a deployment configuration or deployment. Rollout manages the deployment process, while apply and patch modify resources.

  4. What does a Route resource primarily provide in OpenShift?

    1. External access to services within the cluster

    2. Configuration for build pipelines

    3. Definition of pod replicas

    4. Storage for application data

    Show answer and explanation

    Correct answer

    • Configuration for build pipelines

    A Route exposes a service externally by providing a hostname and load balancing. It is used for HTTP/HTTPS access. Builds, replicas, and storage are handled by other resource types.

  5. Which OpenShift object is used to inject environment variables into a container?

    1. ConfigMap

    2. Secret

    3. PersistentVolumeClaim

    4. Both A and B

    Show answer and explanation

    Correct answer

    • Both A and B

    Both ConfigMap and Secret can define key-value pairs that are injected as environment variables into containers. PersistentVolumeClaim provides storage, not environment variables.

  6. What is the main difference between a DeploymentConfig and a Deployment?

    1. DeploymentConfig is OpenShift-specific and supports triggers

    2. Deployment is faster to create

    3. DeploymentConfig cannot be rolled back

    4. Deployment is used only for non-container workloads

    Show answer and explanation

    Correct answer

    • DeploymentConfig is OpenShift-specific and supports triggers

    DeploymentConfig is an OpenShift resource that supports build and image change triggers. Deployment is a Kubernetes resource. Both support rollbacks, and both manage container workloads.

  7. Which action can trigger a new deployment when using a DeploymentConfig?

    1. ConfigMap update

    2. Image change in the BuildConfig

    3. Service deletion

    4. Route modification

    Show answer and explanation

    Correct answer

    • Image change in the BuildConfig

    An image change in the associated BuildConfig can automatically trigger a new deployment. ConfigMap updates may require a manual restart trigger. Service and route changes do not initiate deployments.

  8. What is the role of a ServiceAccount in OpenShift?

    1. To provide identity for processes in pods

    2. To manage user logins

    3. To define network policies

    4. To store application binaries

    Show answer and explanation

    Correct answer

    • To provide identity for processes in pods

    A ServiceAccount provides an identity for processes running in pods, allowing them to interact with the API and other resources. User logins, network policies, and binaries are handled by other mechanisms.

  9. Which OpenShift feature allows you to manage external DNS records automatically?

    1. Route admission control

    2. External DNS provider integration

    3. Image stream tagging

    4. Build hook scripts

    Show answer and explanation

    Correct answer

    • External DNS provider integration

    External DNS provider integration can automatically update DNS records when Routes are created or modified. The other options relate to routing admission, image streams, and build customization.

  10. Question 10

    Link to question

    What is the purpose of an ImageStream in OpenShift?

    1. To track image tags and trigger builds on image updates

    2. To store application source code

    3. To define firewall rules

    4. To manage user permissions

    Show answer and explanation

    Correct answer

    • To track image tags and trigger builds on image updates

    An ImageStream tracks image tags and can trigger builds or deployments when the image changes. It does not store source code or define network or security policies.

  11. Question 11

    Link to question

    Which resource is used to define access policies for pods in OpenShift?

    1. SecurityContextConstraints

    2. NetworkPolicy

    3. RoleBinding

    4. PodPreset

    Show answer and explanation

    Correct answer

    • SecurityContextConstraints

    SecurityContextConstraints control security policies for pods, such as allowed capabilities and user IDs. NetworkPolicy defines network rules, RoleBinding assigns roles, and PodPreset injects configuration.

  12. Question 12

    Link to question

    What does the 'oc new-app' command do?

    1. Creates resources to build and deploy an application from source or an image

    2. Deletes all resources in the current project

    3. Updates the cluster certificate authority

    4. Monitors pod logs in real time

    Show answer and explanation

    Correct answer

    • Creates resources to build and deploy an application from source or an image

    The 'oc new-app' command streamlines creating builds, deployment configs, and services from source code or an image. It automates common application setup tasks. Other commands serve different purposes.

  13. Question 13

    Link to question

    Which OpenShift object is best for defining how to run a single instance of a stateful application?

    1. StatefulSet

    2. DeploymentConfig

    3. DaemonSet

    4. Job

    Show answer and explanation

    Correct answer

    • StatefulSet

    StatefulSet manages stateful applications with stable network IDs and persistent storage. While OpenShift uses DeploymentConfig for many workloads, StatefulSet is the Kubernetes resource designed for stateful instances.

  14. Question 14

    Link to question

    What is the primary use of a ConfigMap in OpenShift?

    1. To provide non-confidential configuration data to pods

    2. To store database passwords securely

    3. To define persistent storage volumes

    4. To manage cluster-wide logging

    Show answer and explanation

    Correct answer

    • To provide non-confidential configuration data to pods

    ConfigMaps store non-sensitive configuration data such as environment variables, command-line arguments, or configuration files. Secrets should be used for sensitive data like passwords.

  15. Question 15

    Link to question

    Which practice helps ensure that only approved container images are deployed in OpenShift?

    1. ImagePolicy webhook

    2. Manual image tagging

    3. Using latest image tags

    4. Disabling project quotas

    Show answer and explanation

    Correct answer

    • ImagePolicy webhook

    An ImagePolicy webhook validates image streams and tags against defined policies, enforcing image approval workflows. Relying on latest tags or manual processes reduces control and security.

Read all flashcards

Recall the answer before opening each card.

Which resource defines how to run an application in OpenShift?

DeploymentConfig. It specifies containers, replicas, and lifecycle management. Services and Routes handle networking; ConfigMaps handle configuration.

What is the purpose of a BuildConfig?

To define the build process from source code to a container image, including strategy (e.g., Docker or S2I) and output image.

Which command updates a running container image to a new version?

'oc set image' updates the container image for a deployment config or deployment. 'oc rollout' manages the deployment process.

What does a Route resource provide?

External HTTP/HTTPS access to a service via a hostname and load balancing. It does not define build pipelines or storage.

Which objects can inject environment variables into a container?

Both ConfigMap and Secret can inject key-value pairs as environment variables or mounted files. PersistentVolumeClaim provides storage only.

How does a DeploymentConfig differ from a Deployment?

DeploymentConfig is OpenShift-specific and supports triggers (image change, build change). Deployment is a Kubernetes resource without those triggers.

What can trigger a new deployment in a DeploymentConfig?

An image change in the associated BuildConfig or ImageStream. ConfigMap or Service changes do not automatically trigger a rollout.

What is the role of a ServiceAccount?

To provide identity for processes in pods, enabling API interaction. It is not for user logins or network policies.

Which feature auto-manages external DNS for Routes?

External DNS provider integration. It automatically updates DNS records when Routes are created or modified.

What is the purpose of an ImageStream?

To track image tags and trigger builds or deployments when the image changes. It does not store source code.

Which resource defines pod security policies?

SecurityContextConstraints (SCC). It controls capabilities, user IDs, and other security settings. NetworkPolicy controls network rules.

What does 'oc new-app' do?

Creates resources (BuildConfig, DeploymentConfig, Service) to build and deploy an application from source code or a container image.

Which object is best for a single instance of a stateful app?

StatefulSet. It provides stable network IDs and persistent storage. DeploymentConfig is for stateless apps.

Primary use of a ConfigMap?

Store non-confidential configuration data (e.g., env vars, config files) for pods. Use Secrets for sensitive data.

How to ensure only approved images are deployed?

Use an ImagePolicy webhook to validate images against defined policies, enforcing approval workflows. Avoid relying on manual checks.

How do you expose a service externally?

Create a Route resource using 'oc expose service '. It assigns a hostname and load balances traffic.

What triggers an automatic rollout in DeploymentConfig?

Image change triggers from a BuildConfig or ImageStream. ConfigMap or Secret changes do not trigger automatic rollouts.

What is the output of a BuildConfig?

A container image pushed to a registry, often tracked via an ImageStream. The BuildConfig defines the source-to-image process.

Which command sets environment variables from a ConfigMap?

'oc set env' or by referencing the ConfigMap in the DeploymentConfig YAML under 'spec.template.spec.containers.env'.

How does a ServiceAccount differ from a user account?

ServiceAccount is for pod processes, not human users. It authenticates to the API server with a token mounted in the pod.

Active recall deck

Practice Red Hat Certified OpenShift Application Developer with real flashcards

Read the prompt, commit to an answer, then flip the card. Move through the deck at your own pace and repeat any topic that does not come back quickly.

20 free cards

Card 1 of 20

1 reviewed this session

Connect the concepts

Your Red Hat Certified OpenShift Application Developer study mind map

Open a branch to connect a topic with its practice questions and explanations. Use the map to choose your next review topic.

Exam-focused analysis

What this Red Hat Certified OpenShift Application Developer practice set measures

This is an analysis of the practice bank, not a claim about the vendor's live exam blueprint. Use it to identify the knowledge, judgment, and recall patterns exercised here, then verify your coverage against the current official exam guide.

Application Deployment and Management

This section focuses on defining and managing application deployments. The practice bank emphasizes DeploymentConfig (OpenShift-specific, supports triggers) and StatefulSet (for stateful apps). 'oc new-app' streamlines initial resource creation, while 'oc set image' updates container images. Understanding the difference between DeploymentConfig and Deployment (Kubernetes native) is key. Rollouts are triggered by image changes in BuildConfig.

  • Use DeploymentConfig for most stateless apps; supports build and image change triggers.
  • StatefulSet is the Kubernetes resource for stateful applications requiring stable identities.
  • 'oc new-app' automates creation of builds, services, and deployment configs from source or image.
  • 'oc set image' updates the container image for a deployment config or deployment.

Build and Release Automation

BuildConfig defines how source code is built into a container image. ImageStream tracks image tags and can trigger deployments when images update. The practice bank highlights that an image change in BuildConfig triggers a new deployment for a DeploymentConfig. External DNS provider integration automatically manages Route hostnames—a facet of release automation.

  • BuildConfig specifies build source, strategy, and output; automates image creation.
  • ImageStream tracks image tags and can trigger builds or deployments on updates.
  • Image change in BuildConfig is a trigger for DeploymentConfig new deployments.
  • External DNS provider integration auto-updates DNS records when Routes are created.

Networking and External Access

Route resources expose services externally via hostnames and load balancing. The practice bank reinforces that Routes provide external HTTP/HTTPS access, not build pipelines or storage. External DNS integration is a feature that automates DNS management. Understanding Route's role is crucial for making applications accessible outside the cluster.

  • Route provides external hostname and load balancing for services.
  • Routes are used for HTTP/HTTPS access; not for builds, replicas, or storage.
  • External DNS integration can automatically update records when Routes are created or modified.

Security and Configuration

SecurityContextConstraints define pod-level security policies. ServiceAccounts provide identity for pod processes. ConfigMaps store non-confidential configuration (env vars, files); Secrets for sensitive data. ImagePolicy webhook enforces that only approved images are deployed. The practice bank tests the difference between ConfigMap and Secret and the role of ServiceAccounts.

  • SecurityContextConstraints control allowed capabilities, user IDs, etc. for pods.
  • ServiceAccount provides an identity for processes in pods to interact with API.
  • ConfigMap stores non-sensitive config; Secret stores sensitive data (e.g., passwords).
  • ImagePolicy webhook validates images against approval policies before deployment.

Study workflow

Turn one Red Hat Certified OpenShift Application Developer attempt into a study plan

  1. 1

    Deploy a Stateless Application

    Use 'oc new-app' with source or image to create a BuildConfig and DeploymentConfig automatically. Alternatively, manually define a DeploymentConfig YAML specifying containers, replicas, and triggers. Apply with 'oc apply -f'. This automates build and deployment lifecycle.

  2. 2

    Trigger a New Deployment on Image Update

    Set up a BuildConfig that outputs to an ImageStream. In the DeploymentConfig, add an image change trigger referencing that ImageStream. When a new image tag is pushed (e.g., via 'oc start-build'), the trigger automatically initiates a rollout. Verify with 'oc rollout status'.

  3. 3

    Expose a Service via Route

    After creating a Service, run 'oc expose service <service-name>' to generate a Route. This creates a hostname for external access. Edit the Route YAML to secure it with TLS or customize the hostname. Use 'oc get route' to see the URL.

  4. 4

    Inject Configuration via ConfigMap

    Create a ConfigMap from literal values or files using 'oc create configmap'. Then in your DeploymentConfig or Deployment, reference the ConfigMap under 'env' (key-value) or 'volumes' (config file). Apply the update. For secrets, use 'oc create secret generic' and reference similarly.

  5. 5

    Enforce Image Approval with ImagePolicy

    Define an ImagePolicy webhook configuration that specifies allowed image registries or tags. Apply as an admission webhook. Then test by deploying an image not matching policy; the deployment should be rejected. This ensures only approved container images run in the cluster.

FAQ

Questions about this exam practice page

Clear boundaries on what the bank covers, how to use it, and where official vendor information still matters.

When should I use a DeploymentConfig instead of a Deployment?+

Use DeploymentConfig when you need OpenShift-specific features like image change triggers from ImageStreams, or when migrating from earlier OpenShift versions. Deployment is the Kubernetes-native resource, better for portability. Both support rollbacks.

How do I automatically redeploy when a ConfigMap changes?+

DeploymentConfig does not automatically redeploy on ConfigMap changes. You need to manually trigger a rollout (e.g., 'oc rollout latest') or use a deployment strategy that restarts pods. Alternatively, use tools like Reloader or a sidecar watcher.

What is the difference between a BuildConfig and a DeploymentConfig?+

A BuildConfig defines how to build a container image from source code (e.g., Dockerfile or S2I). A DeploymentConfig defines how to run that image (replicas, environment, probes). They are often used together: BuildConfig produces an image, and DeploymentConfig runs it.

How can I restrict which images are deployed in OpenShift?+

Use an ImagePolicy webhook that validates image references against policies (e.g., allow only images from trusted registries). You can also use ImageStreamTags with import policies. This prevents running unapproved or vulnerable images.

What is the purpose of a ServiceAccount in OpenShift?+

A ServiceAccount provides an identity for processes running inside a pod. It allows pods to authenticate to the Kubernetes API server and perform authorized operations. For example, a pod can use its ServiceAccount token to list pods or update resources.

Keep studying

Build the next review session

Browse another free bank or use the study strategy guide to turn your misses into spaced review.