Red Hat Certification

EX280 — OpenShift Administrator Study Guide

61 practice questions with correct answers and detailed explanations. Use this guide to review concepts before taking the practice exam.

▶ Take Practice Exam 61 questions  ·  Free  ·  No registration

About the EX280 Exam

The Red Hat OpenShift Administrator (EX280) certification validates professional expertise in Red Hat technologies. This study guide covers all 61 practice questions from our EX280 practice test, complete with correct answers and explanations to help you understand each concept thoroughly.

Review each question and explanation below, then test yourself with the full interactive practice exam to measure your readiness.

61 Practice Questions & Answers

Q1 Hard

You need to configure a custom certificate for the OpenShift API server. Which resource must you modify to apply a custom TLS certificate?

  • A Create a new Secret in the openshift-config namespace and reference it in the APIServer custom resource ✓ Correct
  • B Modify the /etc/kubernetes/pki/apiserver.crt file on each control plane node
  • C Edit the kube-apiserver Deployment directly in the kube-system namespace
  • D Update the certificate through the OpenShift Console UI under Cluster Settings
Explanation

OpenShift uses the APIServer custom resource in the openshift-config namespace to manage API server configuration including TLS certificates. Direct file modification or kube-apiserver Deployment editing bypasses the proper configuration management.

Q2 Easy

Which command lists all custom resources (CRDs) available in an OpenShift cluster?

  • A kubectl list customresources
  • B oc get crd ✓ Correct
  • C oc api-resources --api-group=custom
  • D oc describe crds
Explanation

The 'oc get crd' command displays all CustomResourceDefinitions installed in the cluster. This is the standard way to view available CRDs and their API versions.

Q3 Medium

You are managing RBAC for a development team. Users need to deploy applications but should not have permissions to modify cluster-wide resources. Which ClusterRole is most appropriate?

  • A admin
  • B cluster-admin
  • C view
  • D edit ✓ Correct
Explanation

The 'edit' ClusterRole allows users to create, modify, and delete most application resources within a namespace without granting cluster-wide administrative privileges. The 'admin' role is namespace-scoped while 'edit' provides broader but still restricted permissions.

Q4 Medium

An application requires persistent storage that must survive pod restarts. You create a PVC but the pod remains in Pending state. What is the most common reason for this issue?

  • A Network policies are blocking storage access
  • B The PVC size exceeds the cluster's total available storage capacity
  • C The StorageClass referenced in the PVC does not exist or is not available ✓ Correct
  • D The pod image has not been pulled from the registry yet
Explanation

A pending PVC typically indicates the referenced StorageClass doesn't exist, isn't available, or no storage provisioner can satisfy the request. Verify the StorageClass exists using 'oc get storageclass'.

Q5 Medium

How do you grant a ServiceAccount permission to list pods across all namespaces in an OpenShift cluster?

  • A Modify the ServiceAccount's token to include list permissions
  • B Create a ClusterRole with 'pods: list' permissions and bind it using ClusterRoleBinding ✓ Correct
  • C Create a Role in each namespace with 'pods: get' and bind it using RoleBinding
  • D Add the ServiceAccount to the system:masters group
Explanation

Cluster-wide permissions require a ClusterRole and ClusterRoleBinding. The ClusterRole must specify the 'list' verb for the 'pods' resource across all namespaces.

Q6 Easy

Which OpenShift component is responsible for managing the container runtime on worker nodes?

  • A kube-scheduler
  • B kubelet ✓ Correct
  • C etcd
  • D kube-proxy
Explanation

The kubelet is the node agent that manages the container runtime (CRI-O in OpenShift) and ensures containers run in pods as specified. kube-proxy handles networking, kube-scheduler assigns pods, and etcd stores cluster state.

Q7 Hard

You need to prevent a pod from being scheduled on nodes with a specific label. Which Kubernetes construct should you use?

  • A Node taints and pod tolerations ✓ Correct
  • B A network policy to isolate the pod
  • C Node affinity with requiredDuringSchedulingIgnoredDuringExecution
  • D Pod anti-affinity rules
Explanation

Taints prevent pods from being scheduled unless they have matching tolerations. This is the standard way to exclude pods from nodes. Node affinity is used for positive scheduling preferences, while anti-affinity separates pods from each other.

Q8 Medium

What is the default authentication mechanism for users in OpenShift?

  • A LDAP directory synchronization without an intermediary
  • B Basic authentication with kubeconfig files
  • C Certificate-based authentication for all users
  • D OAuth 2.0 through the internal OpenShift OAuth server ✓ Correct
Explanation

OpenShift includes an integrated OAuth 2.0 server that manages user authentication. External identity providers (LDAP, OIDC, etc.) can be integrated with this OAuth server, but OAuth 2.0 is the default mechanism.

Q9 Hard

You want to configure automatic pod scaling based on custom metrics. Which resource must you deploy and configure?

  • A Metrics Server and a monitoring solution like Prometheus with custom metric adapters ✓ Correct
  • B HorizontalPodAutoscaler with custom metric queries
  • C VerticalPodAutoscaler with resource limits
  • D ClusterAutoscaler for automatic node scaling
Explanation

Custom metrics autoscaling requires a metrics collection system (Prometheus) and a custom metrics API adapter to expose metrics to the HorizontalPodAutoscaler. The Metrics Server only provides CPU/memory metrics.

Q10 Easy

How do you view the logs from a previous instance of a crashed pod?

  • A oc logs <pod-name> --previous ✓ Correct
  • B oc describe pod <pod-name> and review the events section
  • C oc get events -n <namespace> | grep <pod-name>
  • D oc logs <pod-name> --all-containers
Explanation

The '--previous' flag retrieves logs from the previous container instance before a crash or restart. This is essential for debugging application failures.

Q11 Medium

You are setting up a multi-tenant cluster where teams should not see each other's resources. What is the primary mechanism to enforce this isolation?

  • A Configure RBAC so users can only access their assigned namespaces and resources ✓ Correct
  • B Deploy a service mesh with strict mutual TLS between all namespaces
  • C Use NetworkPolicy to block all cross-namespace traffic
  • D Create separate clusters for each team to ensure complete isolation
Explanation

RBAC is the primary access control mechanism that restricts users to their namespaces. While NetworkPolicy adds network-level isolation and service meshes add security, RBAC is the fundamental tenant isolation mechanism.

Q12 Hard

An operator deployment is stuck in a degraded state. Which resource would you check first to diagnose the issue?

  • A The APIServer custom resource for configuration errors
  • B Node status to verify all nodes are in a Ready state
  • C The operator's CSV (ClusterServiceVersion) status and conditions ✓ Correct
  • D The PersistentVolumes to ensure adequate storage exists
Explanation

The ClusterServiceVersion (CSV) for an operator contains detailed status, conditions, and phase information that indicates why an operator deployment is degraded. This is the canonical place to check operator health.

Q13 Easy

Which command creates a new project and automatically sets the current context to that project?

  • A oc new-project <project-name> ✓ Correct
  • B kubectl create namespace <project-name>
  • C oc project --create <project-name>
  • D oc create namespace <project-name>
Explanation

'oc new-project' is the OpenShift-specific command that creates a project (enhanced namespace) and switches context to it. Using 'oc create namespace' or 'kubectl create namespace' creates only the namespace without the OpenShift project wrapper.

Q14 Hard

You need to limit the number of pods a user can create across all their projects. What resource accomplishes this?

  • A A ClusterResourceQuota with a selector matching the user's projects ✓ Correct
  • B ResourceQuota applied to each individual namespace
  • C Network policies with pod limits
  • D An admission webhook to count pods before creation
Explanation

ClusterResourceQuota allows enforcement of resource limits across multiple namespaces based on label selectors, making it ideal for per-user or per-team quotas. Regular ResourceQuota only applies within a single namespace.

Q15 Medium

An image pull fails with 'ImagePullBackOff' error. The image is in a private registry. What must you configure?

  • A Configure the ServiceAccount with pull permissions
  • B Modify the pull image policy in the pod specification
  • C Create a Secret with registry credentials and reference it in the pod's imagePullSecrets ✓ Correct
  • D Add the registry URL to the kubelet's allowed registries list
Explanation

Private registry access requires creating a docker-registry type Secret containing authentication credentials and referencing it via imagePullSecrets in the pod spec or ServiceAccount.

Q16 Easy

You want to ensure that a pod always has a minimum of 2 replicas running. Which resource definition is required?

  • A StatefulSet with serviceName defined
  • B Deployment with replicas: 2 ✓ Correct
  • C PodDisruptionBudget with minAvailable: 2
  • D DaemonSet with nodeSelector
Explanation

A Deployment's replicas field ensures a minimum number of pod replicas are running. PodDisruptionBudget prevents disruption but doesn't create replicas; StatefulSet and DaemonSet have different purposes.

Q17 Medium

How do you configure an application to use a ConfigMap for non-sensitive configuration data?

  • A Store the ConfigMap in etcd and reference it by UUID
  • B Define the ConfigMap and mount it as a volume or expose it as environment variables in the pod spec ✓ Correct
  • C Create the ConfigMap in the kube-system namespace for cluster-wide access
  • D Use ConfigMap only for cluster infrastructure configuration, not applications
Explanation

ConfigMaps can be mounted as volumes for file-based configuration or injected as environment variables. They are designed for application configuration and should be in the same namespace as the pod.

Q18 Medium

What does the 'oc adm' command group provide to cluster administrators?

  • A Administrative commands for managing cluster-wide resources and configuration without needing higher privileges ✓ Correct
  • B Direct access to etcd for manual data repair and recovery operations
  • C Automated disaster recovery and backup procedures for the entire cluster
  • D Advanced debugging and monitoring tools exclusively for OpenShift support teams
Explanation

'oc adm' provides administrative commands for managing cluster resources like managing node resources, creating network policies, and managing quotas. It's designed for cluster administrators with appropriate RBAC permissions.

Q19 Medium

You need to update a running application without any downtime. Which deployment strategy should you use?

  • A RollingUpdate strategy with proper pod disruption budgets and health checks ✓ Correct
  • B Recreate strategy to replace all pods simultaneously
  • C Canary deployment by gradually increasing traffic to new version pods
  • D Blue-green deployment by creating a new Deployment and switching traffic
Explanation

RollingUpdate is Kubernetes' native zero-downtime deployment strategy that gradually replaces old pods with new ones. Combined with PodDisruptionBudget and health checks, it ensures continuous availability.

Q20 Hard

A DaemonSet pod is not being scheduled on a specific node even though the node is Ready. What is the most likely cause?

  • A The kubelet service is stopped on that specific node
  • B The DaemonSet is in a different namespace than the node
  • C The DaemonSet selector doesn't match the node's labels
  • D The node has a taint and the DaemonSet pod lacks a matching toleration ✓ Correct
Explanation

DaemonSets respect taints and require matching tolerations to schedule pods on tainted nodes. DaemonSets don't use label selectors for nodes, and namespace is irrelevant for node-level scheduling.

Q21 Hard

How do you view the audit logs for API requests in OpenShift?

  • A Check the kubelet logs on each worker node for API interactions
  • B Audit logs are written to /var/log/audit/audit.log on control plane nodes and can be accessed through the OpenShift API ✓ Correct
  • C Query the audit logs directly from etcd using 'etcdctl'
  • D Review the Prometheus metrics for API request counts
Explanation

OpenShift API audit logs are stored in /var/log/audit/audit.log on control plane nodes. They can be retrieved and analyzed for security and compliance purposes through the API audit logs.

Q22 Medium

You want to restrict egress traffic from a pod to only specific destinations. Which resource should you configure?

  • A Service mesh egress gateway configuration
  • B An Ingress resource to control traffic flow
  • C NetworkPolicy with egress rules defining allowed destinations ✓ Correct
  • D A pod-level firewall rule in the pod specification
Explanation

NetworkPolicy with egress rules is the Kubernetes-native way to control outbound traffic from pods. Ingress controls inbound traffic, and service meshes are optional add-ons for advanced traffic management.

Q23 Medium

A pod has a liveness probe that keeps triggering restarts. How do you temporarily disable it for debugging?

  • A Delete the entire pod and recreate it without the liveness probe
  • B Use 'oc debug' command to run a privileged container on the node
  • C Modify the kubelet configuration to ignore liveness probe failures
  • D Edit the pod's liveness probe settings or scale the Deployment to 0 and manually run a debug pod with the same image ✓ Correct
Explanation

You can either edit the Deployment to remove/modify the liveness probe or scale to 0 and run a debug pod using the same image for investigation. Direct pod editing doesn't persist, and modifying kubelet affects all pods.

Q24 Medium

What is the primary purpose of the OpenShift Container Registry (OCIR)?

  • A To scan all images for vulnerabilities before they can be deployed
  • B To enforce image signing and cryptographic verification of all deployments
  • C To provide an internal container image registry for storing and managing application images within the cluster ✓ Correct
  • D To manage external container image repositories on Docker Hub and Quay.io
Explanation

The OpenShift Container Registry is the built-in container image registry that stores images for the cluster. While it can integrate with security scanning and external registries, its primary purpose is internal image storage.

Q25 Medium

You need to ensure a node is excluded from pod scheduling without removing it from the cluster. What action should you take?

  • A Uninstall the kubelet service from the node
  • B Apply a taint to the node and update pods with matching tolerations if needed ✓ Correct
  • C Mark the node as NotReady by modifying its status
  • D Delete the node and recreate it with scheduling disabled
Explanation

Tainting a node with 'oc adm taint nodes' prevents new pods from scheduling there unless they have matching tolerations. This keeps the node in the cluster while excluding it from regular scheduling.

Q26 Hard

Which OpenShift feature allows you to automatically scale the number of nodes in a cluster based on resource demands?

  • A DaemonSet which ensures one pod runs on every node in the cluster
  • B ClusterAutoscaler that monitors resource requests and scales node pools up or down accordingly ✓ Correct
  • C MachineSet which statically defines the number of machines in the cluster
  • D HorizontalPodAutoscaler which creates new nodes when pods request more resources
Explanation

ClusterAutoscaler automatically adds nodes when pods cannot be scheduled and removes unneeded nodes. HPA scales pods not nodes, MachineSets are for static definitions, and DaemonSet is for pod distribution.

Q27 Easy

You need to create a new project in OpenShift where developers can deploy applications. What command accomplishes this task?

  • A oc create project myapp
  • B oc project-create myapp
  • C oc new-project myapp ✓ Correct
  • D oc admin new-project myapp
Explanation

The 'oc new-project' command creates a new project and automatically switches context to it. While 'oc create project' may work, it requires additional setup steps.

Q28 Medium

A pod is in a CrashLoopBackOff state. Which of the following is the most appropriate first troubleshooting step?

  • A Check the pod logs using 'oc logs' to identify the application error ✓ Correct
  • B Increase the resource requests for the pod
  • C Delete and recreate the pod immediately
  • D Scale the deployment to zero and back to one
Explanation

Examining pod logs is the standard first diagnostic step when a pod is crashing, as it reveals the actual error message from the application or container startup process.

Q29 Medium

You are configuring role-based access control (RBAC) for your development team. A developer needs read access to pods in a specific namespace. Which resource type should you grant?

  • A ClusterRole with get pods permission scoped to the namespace
  • B RoleBinding that references the 'edit' ClusterRole
  • C Role with get, watch, list permissions for pods in the namespace only ✓ Correct
  • D ClusterRoleBinding with view permissions
Explanation

A Role (namespace-scoped) with get, watch, and list permissions for pods is the principle of least privilege approach for read-only pod access in a single namespace.

Q30 Medium

Your cluster has three master nodes and several worker nodes. A master node fails unexpectedly. What happens to cluster functionality?

  • A The cluster continues to function as the other masters maintain quorum and etcd ✓ Correct
  • B Worker nodes are automatically promoted to master status
  • C Only read operations are allowed until the node is replaced
  • D The cluster becomes completely unavailable immediately
Explanation

With three master nodes, losing one maintains quorum (2 out of 3) allowing etcd and the control plane to continue operating normally.

Q31 Medium

You need to ensure that a specific workload runs only on nodes labeled with 'workload=batch'. How should you configure this requirement?

  • A Set resource limits matching the node configuration
  • B Use nodeSelector in the pod spec with the appropriate label ✓ Correct
  • C Configure a network policy to restrict traffic
  • D Add a toleration to the pod specification
Explanation

The nodeSelector field in a pod specification constrains the pod to only run on nodes matching the specified labels, such as 'workload=batch'.

Q32 Medium

When configuring persistent storage for a database application, which storage type provides the best performance characteristics for high I/O operations?

  • A Locally-attached block storage PersistentVolume ✓ Correct
  • B NFS-backed PersistentVolume
  • C EmptyDir volume
  • D hostPath volume
Explanation

Block storage provides superior I/O performance compared to NFS due to lower latency and higher throughput, making it ideal for database workloads.

Q33 Easy

You want to expose a service internally to other pods within the cluster without making it accessible from outside. What service type should you use?

  • A LoadBalancer
  • B NodePort
  • C ClusterIP ✓ Correct
  • D ExternalName
Explanation

ClusterIP is the default service type that creates an internal IP address accessible only from within the cluster, perfect for internal service-to-service communication.

Q34 Hard

Your organization requires that all container images be scanned for vulnerabilities before deployment. Where in the OpenShift workflow should this validation occur?

  • A During the push to the internal registry
  • B After the pod has started running
  • C During the image build process in the build config
  • D In the admission controller before pod creation ✓ Correct
Explanation

Implementing vulnerability scanning in an admission controller (ImagePolicy or similar webhook) prevents vulnerable images from being deployed before pods are created.

Q35 Medium

You have configured a StatefulSet with three replicas. The pods need persistent storage that persists even after pod deletion. What must you define?

  • A A single PersistentVolumeClaim shared among all replicas
  • B An EmptyDir volume in the pod template
  • C A local hostPath volume on each worker node
  • D A volumeClaimTemplate in the StatefulSet specification ✓ Correct
Explanation

A volumeClaimTemplate in a StatefulSet automatically creates a unique PersistentVolumeClaim for each replica, ensuring persistent storage that survives pod restarts.

Q36 Hard

You need to upgrade the OpenShift cluster from version 4.9 to 4.10. Before initiating the upgrade, what should you verify?

  • A Only the master nodes are accessible via SSH
  • B The cluster operator status and ensuring all are Available
  • C Backup of etcd and verification that update channels support the target version ✓ Correct
  • D All nodes are in a Ready state and no pods are pending
Explanation

Before upgrading, you must verify that a valid upgrade path exists via the configured update channel and ensure etcd is backed up for disaster recovery.

Q37 Medium

A developer reports that their application cannot connect to a database running in another pod. You suspect a network policy is blocking traffic. What command helps diagnose this?

  • A oc describe networkpolicy to review all policies affecting the namespace ✓ Correct
  • B oc exec to test connectivity using tools like curl or nc from the application pod
  • C oc get events to review recent network-related events
  • D oc logs on the database pod to see connection attempts
Explanation

Describing all NetworkPolicies in the namespace reveals ingress and egress rules that may be blocking the required traffic between pods.

Q38 Medium

Your cluster runs multiple applications with varying resource demands. How should you implement resource management to prevent any single application from consuming all cluster resources?

  • A Set resource requests and limits on all pod specifications
  • B Manually monitor and kill pods that exceed resource thresholds
  • C Assign static CPU and memory to each node equally
  • D Configure namespace-level resource quotas and limit ranges ✓ Correct
Explanation

ResourceQuota and LimitRange objects enforce namespace-level constraints on total resource consumption and per-pod limits, preventing resource starvation.

Q39 Easy

You need to view the current configuration of a running deployment. Which kubectl/oc command displays this information?

  • A oc describe deployment <name> ✓ Correct
  • B oc view deployment <name>
  • C oc config view deployment <name>
  • D oc get deployment <name> --show-all
Explanation

'oc describe' displays detailed information about a resource including its current configuration, status, and related events.

Q40 Medium

An organization uses an external LDAP directory for user management. How should you integrate OpenShift authentication with LDAP?

  • A Use a third-party service mesh to proxy LDAP requests
  • B Configure an LDAP identity provider in the cluster OAuth configuration ✓ Correct
  • C Manually create user accounts in OpenShift matching LDAP usernames
  • D Implement LDAP authentication at the application level only
Explanation

OpenShift's OAuth server supports LDAP identity providers through configuration, enabling automatic user provisioning based on LDAP directory queries.

Q41 Hard

You want to implement autoscaling for a deployment based on custom application metrics beyond CPU and memory. What should you deploy and configure?

  • A A custom shell script that periodically scales the deployment
  • B A Prometheus instance integrated with a custom Horizontal Pod Autoscaler configured to query custom metrics ✓ Correct
  • C The Kubernetes Horizontal Pod Autoscaler with custom metrics from the metrics server
  • D The Vertical Pod Autoscaler to automatically adjust resource requests
Explanation

Custom metrics autoscaling requires Prometheus (or similar metrics provider) and configuring the HPA to query custom metrics exposed by your application.

Q42 Hard

Your cluster is experiencing high etcd I/O latency. What is the most likely cause and recommended solution?

  • A Too many deployments exist; delete inactive deployments immediately
  • B etcd is running on slower storage; migrate to faster storage with lower latency characteristics ✓ Correct
  • C The container runtime is misconfigured; restart the container runtime service
  • D Network policies are restricting etcd traffic; remove all network policies
Explanation

etcd performance is highly dependent on storage latency; slow disk I/O directly impacts cluster control plane responsiveness. Moving etcd to faster storage (SSD) is the standard solution.

Q43 Medium

A ConfigMap contains sensitive configuration data that should only be accessed by authorized pods. How should you manage this securely?

  • A Store sensitive data in a ConfigMap with restricted object permissions
  • B Encrypt the ConfigMap using etcd encryption at rest and apply RBAC policies
  • C Ensure the ConfigMap is only readable by cluster administrators
  • D Use a Secret instead of ConfigMap and encrypt it using etcd encryption at rest ✓ Correct
Explanation

Secrets are designed for sensitive data and should always be used instead of ConfigMaps. Combined with etcd encryption, this provides proper security for sensitive configuration.

Q44 Medium

You need to configure health checks for your application pods. What are the two types of probes you should implement?

  • A livenessProbe and readinessProbe to detect failures and readiness ✓ Correct
  • B readinessProbe and startupProbe only
  • C healthProbe and statusProbe for complete coverage
  • D livenessProbe, readinessProbe, and startupProbe for legacy compatibility
Explanation

livenessProbe detects when a pod should be restarted, while readinessProbe determines when a pod is ready to receive traffic—these are the two essential probe types.

Q45 Medium

A node in your cluster is running out of disk space. What OpenShift-specific mechanism can automatically evict pods to prevent node disk pressure?

  • A The cluster autoscaler with disk monitoring enabled
  • B The kubelet's eviction manager based on configured thresholds ✓ Correct
  • C A custom DaemonSet that monitors disk usage
  • D The pod priority system without any monitoring
Explanation

The kubelet eviction manager monitors disk space and evicts pods when thresholds are exceeded, with lower-priority pods evicted first to maintain node stability.

Q46 Medium

You want to deploy multiple versions of an application simultaneously and gradually shift traffic to the new version. Which deployment pattern best supports this?

  • A Rolling update deployment that automatically replaces pods one at a time
  • B Recreate deployment that terminates all pods before starting new ones
  • C Canary deployment using weighted traffic distribution to gradually increase traffic to the new version ✓ Correct
  • D Blue-Green deployment with two complete application stacks and a router switch
Explanation

Canary deployments allow gradual traffic shifting to new versions, enabling real-world testing before full rollout and quick rollback if issues arise.

Q47 Medium

You are implementing cluster monitoring and need to scrape metrics from application pods. Which OpenShift monitoring component should the pods be configured to work with?

  • A The Kubernetes API server metrics endpoint only
  • B A custom sidecar container in each pod for metric collection
  • C Fluentd to collect and forward metrics to a central location
  • D Prometheus with ServiceMonitor custom resources to define scrape configurations ✓ Correct
Explanation

OpenShift uses Prometheus for metrics collection; ServiceMonitor objects define which pods and endpoints Prometheus should scrape for metrics.

Q48 Hard

Your organization mandates that all pods must have security contexts defined with specific UID/GID settings. How should you enforce this cluster-wide?

  • A Create an admission controller webhook that injects security contexts
  • B Configure a SecurityContextConstraint (SCC) policy that requires securityContext specifications
  • C Manually add security contexts to all pod definitions in each deployment
  • D Use Pod Security Standards to restrict and enforce security context requirements ✓ Correct
Explanation

Pod Security Standards (PSS) are the modern way to enforce security policies cluster-wide, defining restricted, baseline, and privileged levels with automatic enforcement.

Q49 Medium

You need to troubleshoot why a scheduled CronJob is not executing. What should you check first?

  • A Verify that the Docker daemon is running on all nodes
  • B Verify the cronjob schedule syntax and check if the job controller is running using 'oc get cronjob' and reviewing the schedule field ✓ Correct
  • C Restart all worker nodes to reset the job scheduler
  • D Check firewall rules preventing job execution
Explanation

First, verify the CronJob schedule syntax (cron format) and check the CronJob object status; the schedule field must follow valid cron syntax to execute properly.

Q50 Medium

A multi-tenant cluster hosts applications from different business units. What is the primary benefit of using separate namespaces for each tenant?

  • A It prevents all cross-namespace communication automatically
  • B It provides resource isolation through quotas and allows independent RBAC policies per tenant ✓ Correct
  • C It completely isolates network traffic between tenants without additional network policies
  • D It automatically encrypts data at rest for each namespace independently
Explanation

Namespaces enable logical isolation with independent ResourceQuotas and RBAC policies per tenant. However, network isolation requires NetworkPolicies.

Q51 Hard

You need to backup the critical cluster state for disaster recovery. What is the most important component that must be backed up?

  • A All container images in the registry
  • B The node SSH keys for administrative access
  • C The etcd database containing all cluster state and configuration ✓ Correct
  • D The container logs from all running pods
Explanation

etcd contains all cluster state, configuration, and resource definitions; backing up etcd is essential for complete cluster recovery after a disaster.

Q52 Medium

You need to configure persistent storage for a database application in OpenShift. Which storage class would you typically use for high-performance, low-latency requirements?

  • A Emptydir volumes for production databases
  • B NFS-based storage with default parameters
  • C Block storage (e.g., AWS EBS) or local SSD ✓ Correct
  • D Object storage (S3-compatible) for all workloads
Explanation

Block storage like AWS EBS and local SSDs provide the low-latency, high-performance characteristics needed for database workloads. NFS is generally slower, object storage is for unstructured data, and emptydir is not persistent.

Q53 Medium

When configuring RBAC in OpenShift, you want to grant a user permission to view pods across all namespaces but not modify them. Which combination should you use?

  • A Role in each namespace with 'pods' resource and 'get' verb only
  • B ServiceAccount with admin access restricted to view-only mode
  • C ClusterRole with 'pods' resource and 'list,watch' verbs; ClusterRoleBinding to the user ✓ Correct
  • D ClusterRole with 'pods' resource and '*' verbs; ClusterRoleBinding to the user
Explanation

A ClusterRole with 'list' and 'watch' verbs (read-only) on the 'pods' resource, bound via ClusterRoleBinding, provides read-only access across all namespaces. The '*' verb would grant all permissions including modifications.

Q54 Easy

You are troubleshooting a pod that fails to start. The pod is in Pending state after 10 minutes. Which command provides the most detailed information about why the pod hasn't been scheduled?

  • A oc get pod <pod-name> -o wide
  • B oc logs <pod-name>
  • C oc exec <pod-name> -- /bin/bash
  • D oc describe pod <pod-name> ✓ Correct
Explanation

'oc describe pod' shows events and detailed status including scheduling failures, resource constraints, and node affinity issues. Logs are unavailable for pending pods, 'get -o wide' shows limited info, and exec won't work on pending pods.

Q55 Hard

Your organization requires all container images to be scanned for vulnerabilities before deployment. Where should you enforce this policy in OpenShift?

  • A Through the DeploymentConfig spec 'securityContext' field
  • B Via a custom script in the CI/CD pipeline outside OpenShift
  • C In the ImageStream object using the 'scan' annotation
  • D Using an admission webhook that validates ImageStreamImport events ✓ Correct
Explanation

An admission webhook can intercept and validate ImageStreamImport events before images enter the registry, ensuring scanning occurs at the cluster level. Annotations don't enforce scanning, securityContext doesn't scan images, and external scanning bypasses cluster enforcement.

Q56 Medium

You need to ensure a critical application pod always runs on specific nodes with GPU hardware. How should you configure this?

  • A Taint all non-GPU nodes with 'gpu=false' and use tolerations
  • B Use pod antiAffinity rules to exclude non-GPU nodes
  • C Configure the pod's resource limits to require GPU in the container spec
  • D Apply nodeSelector with a label matching GPU nodes, or use node affinity with requiredDuringSchedulingIgnoredDuringExecution ✓ Correct
Explanation

nodeSelector and node affinity (required rules) guarantee scheduling on labeled GPU nodes. antiAffinity only excludes nodes, resource limits don't enforce scheduling, and tainting non-GPU nodes is inefficient compared to targeting GPU nodes directly.

Q57 Easy

An application requires credentials stored securely and injected as environment variables into pods. Which OpenShift resource is most appropriate?

  • A ConfigMap with encrypted etcd
  • B PersistentVolumeClaim containing encrypted credential files
  • C Secret with the application mounted as a volume and sourced via envFrom ✓ Correct
  • D ServiceAccount with credentials embedded in annotations
Explanation

Secrets are designed for sensitive data and can be injected as environment variables using envFrom. ConfigMaps are for non-sensitive config, PVCs are for file storage not injection, and ServiceAccount annotations are not secure for credentials.

Q58 Hard

You are implementing a canary deployment where 90% of traffic goes to the stable version and 10% to the new version. Which OpenShift/Kubernetes feature enables this traffic splitting?

  • A Service mesh (e.g., Istio) VirtualService and DestinationRule with traffic weights ✓ Correct
  • B Deployment replicas with manual pod selection in Service endpoints
  • C NetworkPolicy with percentage-based rules
  • D Route object with a simple round-robin load balancing strategy
Explanation

Service mesh tools like Istio provide VirtualService and DestinationRule objects to define weighted traffic distribution. NetworkPolicy is for network access control, manual endpoint selection is not scalable, and basic Routes don't support percentage-based splitting.

Q59 Medium

Your cluster has limited resources. You want to prevent a single namespace from consuming excessive CPU and memory. What should you configure?

  • A NetworkPolicy to throttle traffic to pods in that namespace
  • B ResourceQuota in the namespace specifying limits on aggregate resource requests and limits ✓ Correct
  • C LimitRange in the namespace to set default resource requests for individual containers
  • D PodDisruptionBudget to evict excess pods automatically during resource pressure
Explanation

ResourceQuota enforces cluster-level limits on total resource requests/limits per namespace. LimitRange sets defaults for individual pods, NetworkPolicy controls traffic not compute, and PodDisruptionBudget manages voluntary disruptions, not resource consumption.

Q60 Hard

You need to automate scaling of your application pods based on custom metrics (e.g., message queue depth). Which component should you use?

  • A StatefulSet with a custom init container that monitors and scales
  • B Vertical Pod Autoscaler (VPA) to adjust resource requests dynamically
  • C Horizontal Pod Autoscaler (HPA) with a CustomMetricSource and metrics server ✓ Correct
  • D DeploymentConfig with automatic rollouts triggered by metrics
Explanation

HPA with custom metrics (via metrics server and custom.metrics.k8s.io API) can scale pods based on application-specific metrics like queue depth. VPA adjusts requests not replica count, DeploymentConfig rollouts are for updates not scaling, and custom init containers can't trigger scaling.

Q61 Medium

You want to ensure that a StatefulSet application is accessible within the cluster by a stable DNS name. What should you configure?

  • A A Headless Service (clusterIP: None) associated with the StatefulSet ✓ Correct
  • B A LoadBalancer Service that routes to individual pod IPs
  • C An Ingress object with a wildcard hostname rule
  • D A Route with multiple backends pointing to each pod
Explanation

A Headless Service (with clusterIP: None) provides stable DNS names for each pod in the StatefulSet (e.g., pod-0.service-name.namespace.svc.cluster.local). LoadBalancer doesn't provide per-pod DNS, Ingress is for external access, and Routes don't provide per-pod DNS resolution.

Ready to test your knowledge?

You've reviewed all 61 questions. Take the interactive practice exam to simulate the real test environment.

▶ Start Practice Exam — Free