Free practice · No sign-up required

Red Hat Certified Specialist in Containers and Kubernetes free practice test

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

Question 1 of 15

What is the primary purpose of a container image?

Show hint

Understand container image fundamentals

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 →
Kubernetes application examples

Application examples from the Kubernetes project for practicing manifests and application behavior in a cluster.

Try it: Use a disposable cluster. Read a simple application's manifests, predict which Pods its Service selects, then change a label and use kubectl to diagnose the resulting connectivity problem.

Source is free. A local cluster uses your computer; hosted clusters may incur charges.

Kubernetes official tutorials

Guided tutorials for learning Kubernetes behavior and building practical skills beyond multiple-choice recall.

Try it: Complete a basic application tutorial. Repeat the task without the walkthrough, then explain the difference between declared configuration and observed cluster state.

Documentation is free. Your chosen cluster environment may have costs.

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. What is the primary purpose of a container image?

    1. To provide a runnable instance with application code and dependencies

    2. To store persistent data for applications

    3. To define network policies for pods

    4. To manage user authentication in a cluster

    Show answer and explanation

    Correct answer

    • To provide a runnable instance with application code and dependencies

    A container image packages application code, runtime, libraries, and configuration into a single, portable artifact. It serves as the blueprint for running containers consistently across environments.

  2. Which command lists all running containers on a host?

    1. podman ps

    2. docker images

    3. podman images

    4. docker ps

    Show answer and explanation

    Correct answer

    • podman ps

    The podman ps command displays currently running containers. It is analogous to docker ps in environments using Podman as the container engine.

  3. What does a Kubernetes Pod primarily contain?

    1. One or more containers that share storage and network

    2. A single virtual machine instance

    3. A complete cluster node configuration

    4. Persistent volumes and secrets only

    Show answer and explanation

    Correct answer

    • One or more containers that share storage and network

    A Pod is the smallest deployable unit in Kubernetes and typically holds one or more tightly coupled containers that share network and storage resources.

  4. Which storage type is ephemeral and tied to a container's lifecycle?

    1. EmptyDir volume

    2. PersistentVolumeClaim

    3. Network storage mount

    4. HostPath volume

    Show answer and explanation

    Correct answer

    • EmptyDir volume

    EmptyDir volumes are created when a Pod is assigned to a node and exist as long as that Pod runs. Data is removed when the Pod is deleted.

  5. What is a common use case for a ConfigMap?

    1. To inject configuration data into containers as environment variables or files

    2. To store sensitive credentials securely

    3. To define resource limits for containers

    4. To schedule Pods across nodes

    Show answer and explanation

    Correct answer

    • To inject configuration data into containers as environment variables or files

    ConfigMaps allow you to decouple configuration artifacts from image content to keep containerized applications portable. They are not intended for sensitive data.

  6. Which command creates a local container image from a Dockerfile?

    1. podman build

    2. docker build

    3. podman run

    4. docker create

    Show answer and explanation

    Correct answer

    • podman build

    The podman build command (or docker build) reads instructions from a Dockerfile to produce a new image. This question assumes Podman as the default engine.

  7. What is the role of a container registry?

    1. To store and distribute container images

    2. To monitor application performance

    3. To define network routing for services

    4. To manage user permissions in a cluster

    Show answer and explanation

    Correct answer

    • To store and distribute container images

    A container registry serves as a central repository for storing, naming, and distributing container images. Examples include registries.redhat.io and local registries.

  8. Which resource constraint can be set in a container to limit CPU usage?

    1. cpu shares

    2. memory requests

    3. disk quota

    4. network bandwidth limit

    Show answer and explanation

    Correct answer

    • cpu shares

    CPU shares (in Docker or Podman) and CPU requests (in Kubernetes) control how much CPU time a container can use relative to others.

  9. What is a Service in Kubernetes used for?

    1. To provide stable network access to a set of Pods

    2. To build container images

    3. To store container logs

    4. To define security contexts for containers

    Show answer and explanation

    Correct answer

    • To provide stable network access to a set of Pods

    A Service abstracts access to Pods and provides a stable endpoint (IP and port) for network traffic, commonly used for load balancing across replicas.

  10. Question 10

    Link to question

    Which file is typically used to define a container image build process?

    1. Dockerfile

    2. Containerfile

    3. Makefile

    4. Image.yaml

    Show answer and explanation

    Correct answer

    • Dockerfile

    A Dockerfile contains instructions to assemble a container image, such as base image, dependencies, and entrypoint. Containerfile is an alternative format with similar purpose.

  11. Question 11

    Link to question

    What is the purpose of a readiness probe in Kubernetes?

    1. To determine if a container is ready to serve traffic

    2. To restart a container when it crashes

    3. To allocate CPU resources

    4. To store container logs

    Show answer and explanation

    Correct answer

    • To determine if a container is ready to serve traffic

    Readiness probes signal whether a container is prepared to accept requests. If the probe fails, the Pod is removed from Service endpoints.

  12. Question 12

    Link to question

    Which command pulls an image from a remote registry?

    1. podman pull

    2. docker push

    3. podman run

    4. docker import

    Show answer and explanation

    Correct answer

    • podman pull

    The podman pull command downloads an image from a registry to the local system. Similar functionality exists in Docker with docker pull.

  13. Question 13

    Link to question

    What is a common security practice for container images?

    1. Scan images for vulnerabilities before deployment

    2. Run containers as the root user by default

    3. Share host network namespace with containers

    4. Store secrets in image metadata

    Show answer and explanation

    Correct answer

    • Scan images for vulnerabilities before deployment

    Scanning images helps identify known vulnerabilities. Running as non-root and avoiding secrets in images are also strong security practices.

  14. Question 14

    Link to question

    Which Kubernetes object manages the desired state for Pods?

    1. Deployment

    2. ConfigMap

    3. Service

    4. Namespace

    Show answer and explanation

    Correct answer

    • ConfigMap

    A Deployment manages ReplicaSets to ensure a specified number of Pod replicas are running and supports declarative updates.

  15. Question 15

    Link to question

    What is a namespace in a container or Kubernetes environment?

    1. A logical partition for organizing resources and isolating workloads

    2. A physical server rack location

    3. A type of container image

    4. A storage volume format

    Show answer and explanation

    Correct answer

    • A logical partition for organizing resources and isolating workloads

    Namespaces provide scope for names and help organize cluster resources. They are commonly used to separate development, testing, and production workloads.

Read all flashcards

Recall the answer before opening each card.

What is the primary purpose of a container image?

To provide a portable, runnable snapshot that packages application code, runtime, libraries, and configuration into a single artifact for consistent deployment.

Which command lists all running containers using Podman?

podman ps shows currently running containers; use podman ps -a to include stopped containers.

What does a Kubernetes Pod primarily contain?

One or more containers that share the same network namespace, IP address, and storage volumes, enabling tight coupling.

Which storage type is ephemeral and tied to a Pod's lifecycle?

EmptyDir volume: data exists only while the Pod runs; it is created empty and deleted when the Pod is removed.

What is a common use case for a ConfigMap?

To inject non-sensitive configuration data (e.g., environment variables, files) into containers, decoupling configuration from image content.

Which command creates a local container image from a Dockerfile?

podman build reads the Dockerfile and its context to produce a new image tagged locally.

What is the role of a container registry?

To store, version, and distribute container images so they can be pulled by users or deployment systems.

Which resource constraint can be set in a container to limit CPU usage?

CPU shares (relative weight) or CPU count (absolute limit). In Podman, use --cpus to throttle CPU time.

What is a Service in Kubernetes used for?

To provide a stable network endpoint (IP and port) that load-balances traffic across a set of Pods matching a label selector.

Which file is typically used to define a container image build process?

Dockerfile (or Containerfile) contains instructions like FROM, RUN, and CMD to assemble the image layers.

What is the purpose of a readiness probe in Kubernetes?

To determine if a container is ready to accept traffic; if it fails, the Pod is removed from Service endpoints.

Which command pulls an image from a remote registry?

podman pull downloads an image from a registry (e.g., registry.redhat.io) to the local system.

What is a common security practice for container images?

Scan images for vulnerabilities before deployment and avoid running containers as root inside the container.

Which Kubernetes object manages the desired state for Pods?

Deployment controls ReplicaSets to ensure a specified number of Pod replicas are running and supports rolling updates.

What is a namespace in a container or Kubernetes environment?

A logical partition that organizes resources and isolates workloads within a cluster, providing scope for names.

How does Podman handle rootless containers?

Podman supports running containers without root using user namespaces, mapping the container’s root to an unprivileged user.

What is the difference between a Deployment and a StatefulSet?

Deployment is for stateless applications with identical replicas; StatefulSet manages stateful applications with unique identities and stable storage.

How can you expose a Pod’s port to the outside world without a Service?

Use hostPort in the Pod spec or port forwarding (kubectl port-forward) for direct access, but a Service is preferred for production.

What command can inspect the layers of a container image?

podman history shows the history of layers and commands used to build the image.

What is a PersistentVolumeClaim (PVC) used for?

A PVC requests storage resources from a PersistentVolume, providing durable storage that survives Pod restarts and rescheduling.

Active recall deck

Practice Red Hat Certified Specialist in Containers and Kubernetes 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 Specialist in Containers and Kubernetes 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.

Red Hat Certified Specialist in Containers and Kubernetes15 questions in this practice set
Exam-focused analysis

What this Red Hat Certified Specialist in Containers and Kubernetes 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.

Container Image Fundamentals and Management

Understanding what a container image is and how it is created and distributed forms the bedrock of containerized environments. The practice bank tests the primary purpose of an image as a portable artifact packaging code, runtime, and dependencies. You must know how to build an image from a Dockerfile using podman build and pull images from a registry with podman pull. The role of a container registry as a storage and distribution point is also assessed. These concepts are prerequisites for consistent deployment across different environments and align with Red Hat's container strategy.

  • A container image is a lightweight, standalone executable that includes everything needed to run a piece of software.
  • Podman build and podman pull are the primary commands for building and downloading images.
  • A registry (e.g., quay.io or registry.redhat.io) stores and versions container images for sharing.
  • Dockerfile (or Containerfile) defines the build steps including base image, layers, and entrypoint.

Podman Command Line Operations

Proficiency with the Podman command line is essential for day-to-day container administration. The practice bank covers listing running containers (podman ps), building images, and pulling images. These commands are analogous to Docker commands and are central to Red Hat's container tooling. You must be able to create containers, manage their lifecycle, and inspect their status quickly. Understanding the options for resource constraints (e.g., CPU shares) and state management prepares you for real-world administration tasks.

  • podman ps shows running containers; use -a to include stopped ones.
  • podman build reads a Dockerfile and produces an image tagged locally.
  • podman pull fetches an image from a registry, optionally with version tags.
  • Resource limits like CPU shares control how CPU time is allocated among containers.

Kubernetes Pod, Service, and Workload Management

Kubernetes orchestrates containers at scale, and the practice bank tests core building blocks. A Pod is the smallest deployable unit that can contain one or more containers sharing network and storage. Services provide stable endpoints for accessing Pods, enabling load balancing and service discovery. Deployments manage the desired state of Pods through ReplicaSets, supporting rolling updates and rollbacks. Readiness probes determine if a container is ready to serve traffic, which is crucial for high-availability applications.

  • A Pod encapsulates containers that share the same network namespace and volumes.
  • A Service abstracts access to a set of Pods via a stable IP and port.
  • Deployments declaratively manage Pod replicas and support updates.
  • Readiness probes control whether a Pod is included in Service endpoints.

Configuration, Storage, and Security Best Practices

Effective containerized applications depend on decoupled configuration, appropriate storage, and security measures. ConfigMaps inject non-sensitive data as environment variables or files. EmptyDir volumes provide ephemeral storage tied to a Pod's lifecycle. Security practices such as scanning images for vulnerabilities and avoiding running containers as root are emphasized. Namespaces logically isolate workloads within a Kubernetes cluster. Understanding these concepts ensures that applications are portable, resilient, and secure.

  • ConfigMaps decouple configuration from image content for portability.
  • EmptyDir volumes exist only while a Pod runs and are useful for scratch space.
  • Scan container images for known vulnerabilities before deployment.
  • Namespaces provide scope for resource names and enable multi-tenancy.

Study workflow

Turn one Red Hat Certified Specialist in Containers and Kubernetes attempt into a study plan

  1. 1

    Master Podman CLI Commands

    Practice using podman run, ps, build, pull, and push in a lab environment. Create Dockerfiles and build images with different base images. Use podman ps -a to list all containers including stopped ones. Set resource limits with --cpus and --memory to understand constraints. This hands-on experience solidifies the command syntax tested in the exam.

  2. 2

    Deploy and Expose Applications on Kubernetes

    Create a Deployment YAML that runs multiple replicas of a container image. Expose the Deployment using a Service (ClusterIP, NodePort, or LoadBalancer). Verify that the Service load-balances traffic across Pods. Add readiness and liveness probes to the Pod spec and observe how they affect Pod status in kubectl get pods.

  3. 3

    Work with ConfigMaps and Secrets

    Create a ConfigMap from literal values or files and mount it as volumes or environment variables in a Pod. Distinguish between ConfigMap and Secret usage. Practice updating a ConfigMap and checking if Pods pick up the changes (they may need a restart). This reinforces decoupling configuration from images.

  4. 4

    Manage Ephemeral and Persistent Storage

    In Kubernetes, create a Pod with an EmptyDir volume and write data to it; delete and recreate the Pod to confirm data loss. Then create a PersistentVolumeClaim (PVC) and use it in a Pod to persist data across Pod restarts. Understand the lifecycle differences and when to use each storage type.

  5. 5

    Implement Security Scanning and Best Practices

    Install a vulnerability scanner (e.g., Red Hat's docker registry scanning or Skopeo) and scan an image from a public registry. Review the report. Also, modify a Dockerfile to run the application as a non-root user and rebuild. Test that the container runs without privilege escalation. This practice aligns with the exam's security emphasis.

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.

How do the Podman commands tested here differ from Docker commands on the Red Hat exam?+

Podman is often the default container engine on Red Hat Enterprise Linux 8 and later, but its CLI syntax is almost identical to Docker. The exam may use either, so familiarity with both is recommended. Commands like podman ps, build, pull, and run work the same way as their docker counterparts.

Why is EmptyDir considered ephemeral and when should I use it?+

EmptyDir volumes exist only while a Pod occupies a node. They are created fresh when a Pod starts and discarded when the Pod is deleted. Use EmptyDir for temporary scratch space, cache, or shared data between containers in the same Pod. For persistent data, use PersistentVolumeClaims.

What is the difference between a ConfigMap and a Secret?+

ConfigMaps store non-sensitive configuration data as key-value pairs, while Secrets store sensitive data like passwords or SSH keys. Secrets are encoded (not encrypted by default) and can be mounted as volumes or environment variables. Both allow decoupling configuration from container images, but Secrets have additional RBAC controls.

How does a readiness probe affect a Service's load balancing?+

A readiness probe determines if a Pod is ready to serve traffic. If the probe fails, the Pod is removed from the Service's endpoints, so no requests are routed to it. This prevents serving traffic to Pods that are still initializing or overwhelmed. The liveness probe, in contrast, restarts unhealthy containers.

What is the role of namespaces in the exam context?+

Namespaces logically divide a Kubernetes cluster into virtual sub-clusters. They provide isolation for resources (Pods, Services, etc.) and are used to separate environments (e.g., dev, test, prod) or teams. In Red Hat's OpenShift, projects are namespaces with additional annotations. Understanding namespaces is critical for multi-tenancy and resource quotas.

Keep studying

Build the next review session

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