Red Hat Certification

EX362 — OpenShift Advanced Admin 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 EX362 Exam

The Red Hat OpenShift Advanced Admin (EX362) certification validates professional expertise in Red Hat technologies. This study guide covers all 61 practice questions from our EX362 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 Medium

When configuring network policies in OpenShift to restrict ingress traffic, which API version and kind are typically used?

  • A APIVersion: network.openshift.io/v1, Kind: IngressPolicy
  • B APIVersion: v1beta1, Kind: NetworkSecurityPolicy
  • C APIVersion: v1, Kind: NetworkPolicy
  • D APIVersion: networking.k8s.io/v1, Kind: NetworkPolicy ✓ Correct
Explanation

NetworkPolicy is part of the Kubernetes networking.k8s.io/v1 API group and is the standard way to define network segmentation in OpenShift clusters.

Q2 Hard

Which command allows you to view the audit logs for API requests made to the OpenShift cluster?

  • A oc get events -A --sort-by='.lastTimestamp'
  • B oc adm audit logs
  • C journalctl -u apiserver on the master node ✓ Correct
  • D oc logs -n openshift-apiserver deployment/apiserver
Explanation

Audit logs are typically accessed directly on control plane nodes via journalctl for the apiserver service, as they record all API requests at the system level.

Q3 Easy

In OpenShift, how do you configure a user to have cluster-admin privileges securely using RBAC?

  • A Edit the /etc/kubernetes/manifests/kubelet.conf file directly
  • B Add the user to the system:masters group in the system-auth ConfigMap
  • C Use 'oc adm policy add-cluster-role-to-user cluster-admin <username>' ✓ Correct
  • D Modify the clusterRoleBindings.yaml file in etcd
Explanation

The 'oc adm policy' command is the proper and secure way to manage RBAC bindings in OpenShift, applying the principle of least privilege through the API.

Q4 Medium

When using PersistentVolumes with local storage on OpenShift, what is a critical consideration for data availability?

  • A Local storage automatically replicates across all nodes in the cluster
  • B Local storage is suitable for applications requiring high availability since it provides built-in redundancy at the storage level
  • C Applications using local storage may experience data loss if the node fails, so they must handle failures gracefully ✓ Correct
  • D Local storage volumes can be migrated between nodes without any downtime or data loss
Explanation

Local storage is node-specific and has no built-in replication; applications must be designed to tolerate node failures or use multiple replicas across different nodes.

Q5 Medium

What is the purpose of the OpenShift ImageStream resource?

  • A It encrypts container images during transit to external registries
  • B It manages the replication of images between OpenShift clusters automatically
  • C It stores container images in a local registry only accessible to that project
  • D It provides a logical grouping of related container images and tracks image history and tags across multiple registries ✓ Correct
Explanation

ImageStreams abstract the source of images and provide a way to track image versions and tags, enabling automatic deployments when images are updated.

Q6 Medium

Which of the following correctly describes the relationship between a DeploymentConfig and a Deployment in OpenShift?

  • A They are identical and can be used interchangeably with no functional differences
  • B Deployment is the Kubernetes-native resource; DeploymentConfig is OpenShift-specific with additional features like automatic rollbacks on image changes ✓ Correct
  • C DeploymentConfig is the newer, recommended resource that replaces Deployment in OpenShift
  • D DeploymentConfig only works with OpenShift-specific storage backends like NFS
Explanation

While both manage pod replicas, DeploymentConfig is OpenShift-specific and integrates tightly with ImageStreams for automatic triggering, whereas Deployment is the standard Kubernetes resource.

Q7 Easy

How can you ensure that a pod in OpenShift is scheduled on a specific node type, such as GPU-enabled nodes?

  • A Use the podNodeAffinityEnforcement admission controller
  • B Use nodeSelector in the pod spec with appropriate labels matching the node labels ✓ Correct
  • C Set the pod's priorityClassName to a GPU-specific priority class
  • D Modify the pod's CPU and memory requests to exceed non-GPU nodes' capacity
Explanation

nodeSelector is the primary method to constrain pod placement by matching labels; nodes must be labeled appropriately (e.g., gpu=true) for this to work.

Q8 Medium

When implementing a multi-tenant OpenShift cluster, which feature prevents one tenant's pods from accessing another tenant's secrets?

  • A NetworkPolicies isolate all network traffic between projects, preventing secret access entirely
  • B RBAC and namespaces ensure users can only access resources in their assigned projects, with secrets encrypted and isolated by default ✓ Correct
  • C Service mesh mutual TLS certificates are required for all secret access between pods
  • D The OpenShift API Server automatically encrypts all secrets with tenant-specific keys embedded in pod environment variables
Explanation

Kubernetes RBAC combined with namespace isolation ensures secrets in one namespace are inaccessible to other namespaces; OpenShift strengthens this with project-level isolation.

Q9 Medium

What is the correct way to configure resource quotas for a project to prevent resource exhaustion in OpenShift?

  • A Use a LimitRange object only, as ResourceQuota is deprecated in modern OpenShift versions
  • B Use the 'oc set limits' command which automatically creates and manages quotas across all projects
  • C Configure limits only in pod specifications; project-level quotas are handled by the master nodes automatically
  • D Create a ResourceQuota object in the project specifying limits for pods, memory, CPU, and storage ✓ Correct
Explanation

ResourceQuota objects define aggregate limits for a namespace; LimitRange objects define limits per container, and both should be used together for comprehensive resource management.

Q10 Hard

In OpenShift, which certificate is used by the kubelet to communicate with the API server?

  • A The node's etcd peer certificate used for all API communications
  • B A client certificate signed by the Kubernetes CA that is stored in /var/lib/kubelet/pki/ ✓ Correct
  • C The cluster's wildcard certificate stored in the openshift-config-managed namespace
  • D A service account token that is automatically rotated every 24 hours
Explanation

Kubelets use client certificates signed by the Kubernetes CA to authenticate with the API server; these are typically managed by the cluster's certificate signing system.

Q11 Medium

How do you enable cluster monitoring and metrics collection in OpenShift?

  • A Metrics are always enabled by default and cannot be disabled; they are collected by the built-in Prometheus instance
  • B Enable the monitoring stack by creating a ClusterMonitoringConfig object in the openshift-monitoring namespace ✓ Correct
  • C Deploy Prometheus and Grafana manually using Helm charts from the community
  • D Use the 'oc adm monitoring enable' command to activate the monitoring operator
Explanation

OpenShift includes a built-in Prometheus-based monitoring stack that is configured and managed through the ClusterMonitoringConfig CustomResource.

Q12 Hard

What is the primary purpose of the OpenShift MachineConfigPool resource?

  • A It monitors machine health and automatically replaces failed nodes in the cluster
  • B It groups machines that share the same configuration and enables coordinated updates via the Machine Config Operator ✓ Correct
  • C It manages the authentication credentials for kubelet communication across multiple machines
  • D It pools unused machine capacity for temporary pod scheduling during cluster scaling events
Explanation

MachineConfigPool resources group nodes with similar purposes (e.g., masters, workers) and coordinate OS-level configuration updates through the Machine Config Operator.

Q13 Medium

Which of the following best describes how OpenShift integrates with external authentication providers like LDAP?

  • A OAuth and Identity Providers can be configured to authenticate users against LDAP or other external systems, with tokens cached in the cluster ✓ Correct
  • B Direct LDAP integration at the pod level requires custom code in each application
  • C External authentication is only supported through a reverse proxy configured in front of the OpenShift API Server
  • D LDAP users must manually sync their credentials with OpenShift service accounts before accessing the cluster
Explanation

OpenShift's OAuth server can be configured with identity providers including LDAP, which authenticate users and provide tokens for accessing the cluster.

Q14 Medium

What does the 'oc adm drain' command do, and when should it be used?

  • A It drains excess memory from a node to improve performance during high-load periods
  • B It removes all network policies and security groups from a node to reset its configuration
  • C It immediately shuts down all pods on a node to perform emergency maintenance
  • D It gracefully evicts pods from a node (respecting PodDisruptionBudgets) so the node can be taken offline for maintenance or deprovisioning ✓ Correct
Explanation

The drain command gracefully removes pods from a node, allowing them to migrate to other nodes before the node is cordoned and taken offline for maintenance.

Q15 Hard

In OpenShift, how are container images scanned for vulnerabilities automatically?

  • A Red Hat Advanced Cluster Security (ACS) or similar tools can be integrated to scan images for vulnerabilities as part of the deployment pipeline ✓ Correct
  • B Images are scanned manually by running 'oc image scan' after they are pushed to the registry
  • C Vulnerability scanning is performed on the container runtime and blocks any vulnerable images from running
  • D The Image Registry automatically scans all pushed images using an integrated vulnerability database that is updated nightly
Explanation

While OpenShift provides the infrastructure, vulnerability scanning is typically implemented through external tools like Red Hat ACS that integrate with the registry and deployment workflows.

Q16 Medium

What is the correct approach to managing TLS certificates for OpenShift routes?

  • A Routes can be configured with edge, reencrypt, or passthrough TLS termination with certificates stored as secrets in the namespace ✓ Correct
  • B All routes use self-signed certificates by default; TLS must be explicitly disabled in production
  • C Use the cert-manager operator to automatically provision and renew certificates from Let's Encrypt for all routes
  • D TLS is only available for routes in the openshift-system namespace; user namespaces use HTTP only
Explanation

Routes support three TLS termination modes (edge, reencrypt, passthrough) and use certificates stored as Kubernetes secrets; cert-manager can automate renewal but is not required.

Q17 Medium

How do you troubleshoot a pod that is stuck in the 'Pending' state in OpenShift?

  • A Increase the cluster's overall CPU and memory capacity, as pending pods indicate the cluster is always resource-constrained
  • B Delete and recreate the pod immediately, as pending pods are always caused by temporary API server issues
  • C Check the kubelet logs on the master node to determine why the pod cannot be scheduled
  • D Use 'oc describe pod' to check events and pod status, then examine node resources, taints, and pod resource requests ✓ Correct
Explanation

The 'oc describe pod' command shows detailed event logs that indicate scheduling failures such as insufficient resources, node affinity conflicts, or taints.

Q18 Easy

What is the purpose of the OpenShift Router component?

  • A It distributes API server load across multiple master nodes using round-robin scheduling
  • B It manages network traffic between pods within the cluster only and does not handle external ingress
  • C It acts as an ingress controller that routes HTTP/HTTPS traffic to services based on route resources and hostnames ✓ Correct
  • D It provides container networking at the CNI level and manages overlay network encryption between nodes
Explanation

The OpenShift Router (typically running as HAProxy or similar) reads Route objects and configures itself to route external HTTP/HTTPS traffic to the appropriate services.

Q19 Hard

When implementing pod security policies in OpenShift 4.x, which approach is recommended?

  • A Configure the SecurityContext in every pod spec, as cluster-level policies are not enforced in OpenShift
  • B Use custom ValidatingWebhookConfigurations to implement proprietary security policies
  • C Deploy the PodSecurityPolicy admission controller, which is the default and only method for enforcing pod security
  • D Use Pod Security Standards with restricted/baseline/unrestricted profiles applied at the namespace level via labels ✓ Correct
Explanation

OpenShift 4.x uses Pod Security Standards (evolved from PodSecurityPolicy) with profiles applied via namespace labels for better maintainability and flexibility.

Q20 Medium

What is etcd in the context of OpenShift, and why is its backup critical?

  • A etcd is the logging service that aggregates pod logs; backups ensure log retention for compliance
  • B etcd is the persistent volume storage backend; without backup, all user data is permanently lost
  • C etcd is the container runtime component that stores cached layer data; backup is needed only for disaster recovery
  • D etcd is the distributed key-value store that stores all cluster state and configuration; losing etcd means losing the cluster's entire state ✓ Correct
Explanation

etcd stores all Kubernetes cluster state, configuration, and secrets; without backups, cluster corruption or failure can result in complete data loss of all API objects.

Q21 Hard

How can you prevent a pod from being evicted during node memory pressure in OpenShift?

  • A Set the pod's priorityClassName to a high-priority class and request guaranteed QoS by setting equal CPU/memory requests and limits ✓ Correct
  • B Use the pod's tolerations to tolerate memory-pressure taints applied to nodes
  • C Disable the kubelet's eviction manager by setting the --eviction-hard flag to an empty value
  • D Configure a PodDisruptionBudget to ensure the pod remains running during memory pressure events
Explanation

High-priority pods with guaranteed QoS (requests equal to limits) are evicted last; PodDisruptionBudgets protect against voluntary disruptions but not evictions from resource pressure.

Q22 Easy

In OpenShift, what is the difference between a Service and a Route?

  • A Routes are internal-only constructs that provide DNS; Services expose pods to external networks via load balancers
  • B Services are stateless load balancers; Routes are stateful proxies that maintain connection state for clients
  • C They are identical and the terms are used interchangeably in OpenShift documentation
  • D Services provide internal DNS and load balancing between pods; Routes expose services externally via HTTP/HTTPS with hostname-based routing ✓ Correct
Explanation

Services provide cluster-internal communication and DNS, while Routes expose services to external traffic with HTTP/HTTPS termination and hostname-based routing.

Q23 Medium

How do you configure pod network policies to allow traffic only from specific namespaces?

  • A Use Service Mesh VirtualService resources with specific destination rules for each namespace
  • B Configure firewall rules at the node level to block traffic from unwanted namespaces
  • C Modify the pod's service account to include role bindings that allow traffic only from specific namespaces
  • D Use a NetworkPolicy with a namespaceSelector in the from field to specify allowed source namespaces ✓ Correct
Explanation

NetworkPolicy resources support namespaceSelector in their from/to fields to allow or deny traffic based on source/destination namespace labels.

Q24 Medium

What is the purpose of the OpenShift Operator Framework?

  • A It provides a standardized way to package, deploy, and manage Kubernetes applications as Operators that extend cluster functionality ✓ Correct
  • B It provides a single command-line interface for managing all container orchestration platforms including Docker Swarm
  • C It manages the automatic scaling of operators based on API request volume
  • D It enforces operator access control policies to limit which users can execute administrative commands
Explanation

The Operator Framework provides tools and standards for building and deploying Operators that automate application lifecycle management beyond what standard Kubernetes resources provide.

Q25 Medium

When configuring a StatefulSet in OpenShift, what is the significance of the serviceName field?

  • A It designates the external service used for load balancing traffic into the StatefulSet
  • B It configures the service account that the StatefulSet pods will use for API authentication
  • C It specifies the headless service that provides stable DNS names for individual pods in the StatefulSet ✓ Correct
  • D It determines which admission controller validates the StatefulSet manifest before creation
Explanation

The serviceName field references a headless Service (clusterIP: None) that provides stable DNS records like pod-0.service-name, critical for StatefulSet ordering and discovery.

Q26 Medium

Which of the following is a best practice for managing cluster updates in OpenShift?

  • A Use the Cluster Version Operator to manage updates with built-in validation and gradual rollout across nodes ✓ Correct
  • B Update all nodes simultaneously to minimize the duration of the update process and service disruption
  • C Manually edit the control plane manifests in /etc/kubernetes/manifests/ to apply patches directly
  • D Disable all pod disruption budgets during updates to ensure all pods are rescheduled quickly
Explanation

The Cluster Version Operator automates OpenShift updates with built-in safety checks, gradual rollout, and automatic rollback on failure.

Q27 Medium

When implementing network policies in OpenShift, which resource type is used to define ingress and egress rules at the namespace level?

  • A NetworkPolicy ✓ Correct
  • B PodSecurityPolicy
  • C SecurityContextConstraints
  • D EgressNetworkPolicy
Explanation

NetworkPolicy is the standard Kubernetes resource for defining network access rules. While EgressNetworkPolicy exists in OpenShift, NetworkPolicy is the primary resource for comprehensive ingress and egress control.

Q28 Hard

You need to configure persistent storage for a stateful application in OpenShift. Which storage class characteristic is MOST important for high-performance databases?

  • A IOPS capacity, latency characteristics, and volume binding mode ✓ Correct
  • B Only the storage size limit
  • C Whether it uses NFS or block storage exclusively
  • D Provisioner type and reclaim policy settings
Explanation

For stateful applications like databases, IOPS, latency, and binding mode (Immediate vs WaitForFirstConsumer) are critical performance factors. These characteristics directly impact application performance and data consistency.

Q29 Easy

What is the primary purpose of using a ServiceAccount in OpenShift?

  • A To define resource quotas at the project level
  • B To manage user login credentials for the OpenShift web console
  • C To provide identity and authentication for pods running within the cluster ✓ Correct
  • D To restrict network traffic between pods
Explanation

ServiceAccounts provide an identity for processes running in pods, allowing them to authenticate with the Kubernetes API and access resources according to their assigned roles.

Q30 Medium

When configuring RBAC in OpenShift, what is the relationship between a ClusterRole and a ClusterRoleBinding?

  • A ClusterRole manages user passwords while ClusterRoleBinding controls network access
  • B They are interchangeable and serve the same purpose across all OpenShift clusters
  • C ClusterRoleBinding defines permissions and ClusterRole applies them to specific namespaces only
  • D ClusterRole defines permissions; ClusterRoleBinding assigns those permissions to users, groups, or service accounts cluster-wide ✓ Correct
Explanation

ClusterRole is a collection of permissions (verbs applied to resources), while ClusterRoleBinding connects those permissions to subjects (users, groups, service accounts) at the cluster level.

Q31 Medium

You are troubleshooting a pod that fails to start with a CrashLoopBackOff status. Which command provides the most detailed information about the failure?

  • A oc status
  • B oc describe pod <pod-name>
  • C oc logs <pod-name> --previous ✓ Correct
  • D oc get events -n <namespace>
Explanation

The '--previous' flag retrieves logs from the previous container instance, which is essential when the current container hasn't started yet. This shows the actual error that caused the crash.

Q32 Easy

In an OpenShift cluster, which component is responsible for scheduling pods to worker nodes based on resource requests and constraints?

  • A Kube-scheduler ✓ Correct
  • B Controller-manager
  • C API server
  • D Kubelet
Explanation

The Kube-scheduler examines pod requirements and node capacity, then assigns pods to appropriate nodes. The kubelet runs on nodes and manages container execution, but doesn't make scheduling decisions.

Q33 Medium

When implementing resource quotas in OpenShift, you notice that pod creation is being rejected even though individual resource requests appear acceptable. What is the MOST likely cause?

  • A The Ingress controller is misconfigured
  • B The pod's resource request exceeds the quota limit for the entire namespace ✓ Correct
  • C The SecurityContextConstraints policy is rejecting the pod
  • D The ClusterRole bindings are insufficient for the service account
Explanation

Resource quotas limit the total resources consumed in a namespace. If the sum of all pod requests in a namespace exceeds the quota, new pods will be rejected regardless of individual request sizes.

Q34 Hard

You need to configure pod affinity rules so that pods from a specific deployment run on the same nodes as pods from another deployment. Which affinity type should you use?

  • A PodAntiAffinity with requiredDuringSchedulingIgnoredDuringExecution
  • B PodAffinity with requiredDuringSchedulingIgnoredDuringExecution ✓ Correct
  • C PodAffinity with preferredDuringSchedulingIgnoredDuringExecution
  • D NodeAffinity with a nodeSelector
Explanation

PodAffinity with 'required' enforcement ensures co-location of pods from different deployments on the same nodes. The 'preferred' variant would allow failures, while 'required' guarantees the constraint.

Q35 Easy

What does the 'oc adm' command set primarily provide in OpenShift?

  • A Application deployment and management capabilities
  • B User authentication and login management for the cluster
  • C Monitoring and logging aggregation across the cluster
  • D Administrative operations for cluster management, such as managing node resources and creating certificates ✓ Correct
Explanation

'oc adm' provides administrator-level commands for cluster operations like managing nodes, creating certificates, policy management, and other administrative tasks beyond standard user operations.

Q36 Hard

In OpenShift, which mechanism prevents a pod from being evicted during node maintenance or resource pressure?

  • A PodDisruptionBudget with minAvailable set to the pod count ✓ Correct
  • B Using node affinity to pin pods to specific nodes only
  • C Setting the pod priority to the highest possible value
  • D Configuring preemption policies in the deployment spec
Explanation

PodDisruptionBudget (PDB) ensures minimum availability during voluntary disruptions. It prevents eviction of too many pods simultaneously, protecting application availability during maintenance or resource pressure.

Q37 Medium

When configuring OpenShift authentication, what is the primary difference between OAuth and SAML identity providers?

  • A They are functionally identical and can be used interchangeably without configuration changes
  • B SAML is more secure and OAuth should only be used for development environments
  • C OAuth supports multi-factor authentication while SAML does not
  • D OAuth is token-based and SAML uses assertion-based XML authentication, with SAML typically used for enterprise SSO integration ✓ Correct
Explanation

OAuth uses tokens for authentication while SAML uses XML assertions. SAML is commonly integrated with enterprise SSO systems like Active Directory, whereas OAuth is more commonly used with web-based identity providers.

Q38 Medium

You are configuring a custom StorageClass for your OpenShift cluster. Which parameter would you set to ensure that volumes are only provisioned on demand when a PVC is created?

  • A volumeBindingMode: WaitForFirstConsumer ✓ Correct
  • B volumeBindingMode: Immediate
  • C allowVolumeExpansion: true
  • D reclaimPolicy: Retain
Explanation

WaitForFirstConsumer delays volume provisioning until a pod references the PVC, which can improve scheduling decisions and resource efficiency. Immediate binds the volume immediately when the PVC is created.

Q39 Medium

What is the primary advantage of using StatefulSets instead of Deployments for applications in OpenShift?

  • A StatefulSets automatically backup data to persistent volumes without additional configuration
  • B StatefulSets are cheaper because they require fewer replicas to function properly
  • C StatefulSets automatically scale based on CPU metrics, while Deployments do not
  • D StatefulSets provide stable network identities, persistent storage per replica, and ordered deployment and scaling ✓ Correct
Explanation

StatefulSets maintain stable pod identities (hostname, network), manage persistent storage binding, and handle ordered operations. These features are essential for databases and other stateful applications.

Q40 Medium

In OpenShift, which resource type allows you to run privileged containers with specific capabilities while maintaining security constraints?

  • A SecurityContextConstraints (SCC) ✓ Correct
  • B ClusterRole with admin permissions only
  • C NetworkPolicy with ingress rules
  • D PodSecurityPolicy in restricted mode
Explanation

SecurityContextConstraints (SCC) is OpenShift's security policy mechanism that allows fine-grained control over pod security, including capability management, privileged execution, and SELinux policies.

Q41 Hard

When scaling a Deployment in OpenShift, you set the desired replica count but the pods fail to schedule. Resource requests appear valid individually. What should you investigate first?

  • A Whether node affinity rules are preventing pod placement
  • B The Ingress configuration for the deployment
  • C The total resource requests compared to available cluster capacity and namespace quotas ✓ Correct
  • D Whether the ServiceAccount has sufficient RBAC permissions
Explanation

When pods won't schedule despite valid individual requests, the issue is typically that aggregate resource requests (requests × replicas) exceed available cluster capacity or namespace resource quotas.

Q42 Easy

You need to expose an internal OpenShift service to external traffic while maintaining TLS encryption. Which resource type should you create?

  • A NetworkPolicy allowing ingress from external IPs
  • B Service with type NodePort
  • C Service with type LoadBalancer and an external IP
  • D Route with TLS termination configuration ✓ Correct
Explanation

Routes are OpenShift's mechanism for exposing services externally with TLS termination. Services alone don't provide TLS termination; Routes add this capability specific to OpenShift.

Q43 Hard

When implementing image security scanning in OpenShift, which component scans container images for vulnerabilities upon admission to the cluster?

  • A An external scanning service called by the scheduler
  • B ImageStream controller scanning all referenced images automatically
  • C The kubelet daemon scanning images on each worker node
  • D An admission webhook or ImageSignatureVerificationPolicy that validates images before pod creation ✓ Correct
Explanation

Admission webhooks intercept pod creation requests and can validate image signatures or scan images before they're admitted. ImageSignatureVerificationPolicy specifically enforces image signature verification.

Q44 Easy

In OpenShift, what is the primary purpose of a ConfigMap?

  • A To store non-sensitive configuration data that can be mounted as files or set as environment variables ✓ Correct
  • B To manage persistent storage for stateless applications
  • C To securely store passwords and API keys for applications
  • D To define network policies for pod-to-pod communication
Explanation

ConfigMaps store non-sensitive configuration data in key-value pairs. Secrets should be used for sensitive data like passwords. ConfigMaps can be mounted as volumes or referenced as environment variables.

Q45 Hard

You are configuring audit logging for an OpenShift cluster. Which audit policy decision would log only requests that modify cluster state?

  • A level: None to disable unnecessary logging
  • B level: Metadata for write operations only
  • C level: Metadata with a filter for write verbs (create, update, delete, patch) ✓ Correct
  • D level: RequestResponse
Explanation

Metadata level logs request/response metadata without request/response bodies, and filtering by write verbs (create, update, delete, patch) captures only state-modifying operations, reducing log volume while maintaining security audits.

Q46 Medium

When troubleshooting node issues in OpenShift, you notice a node is in NotReady status. Which command should you use to examine detailed node conditions and events?

  • A oc describe node <node-name> ✓ Correct
  • B oc status
  • C oc logs <node-name>
  • D oc get pods --all-namespaces
Explanation

'oc describe node' provides detailed information about node conditions (Ready, MemoryPressure, DiskPressure), capacity, and recent events explaining why the node entered NotReady state.

Q47 Hard

In OpenShift, which mechanism allows you to define multiple versions of an application and gradually shift traffic between them?

  • A StatefulSets with rolling update strategy
  • B Ingress rules with load balancing
  • C Multiple Deployments with manual traffic adjustment via Service selectors
  • D Routes with canary or blue-green deployment patterns using weighted traffic distribution ✓ Correct
Explanation

OpenShift Routes support traffic distribution across multiple services using weights, enabling canary deployments and blue-green strategies. Multiple Deployments alone don't provide built-in traffic shifting.

Q48 Medium

What is the correct order of operations when updating a Deployment in OpenShift using a rolling update strategy?

  • A Scale down to zero replicas, update the image, then scale back up to desired replicas
  • B Create new pods, verify readiness, terminate old pods sequentially based on maxSurge and maxUnavailable parameters ✓ Correct
  • C Create new pods in parallel, wait indefinitely for readiness probes, then remove old pods
  • D Terminate all old pods immediately, then create new pods with the updated image
Explanation

Rolling updates create new pods while gradually removing old ones, controlled by maxSurge (additional pods allowed) and maxUnavailable (pods allowed to be unavailable). This maintains service availability during updates.

Q49 Hard

You need to ensure that a critical application pod is never evicted due to resource pressure on a node. Which combination of features should you implement?

  • A Use only PodDisruptionBudget with minAvailable equal to the replica count and configure node affinity to pin the pod to a specific node
  • B Set pod QoS class to Guaranteed and configure a high PodPriority value ✓ Correct
  • C Configure only the pod's resource requests without any additional protective mechanisms
  • D Set pod QoS class to BestEffort and increase the node's resource capacity indefinitely
Explanation

Guaranteed QoS (requests equal to limits) prevents eviction under normal conditions, while high PodPriority ensures the pod is only evicted if lower-priority pods cannot free enough resources. Together they provide strong protection.

Q50 Medium

In OpenShift, which API group contains resources related to application deployments such as Deployments, StatefulSets, and DaemonSets?

  • A extensions/v1beta1
  • B batch/v1
  • C apps/v1 ✓ Correct
  • D v1 (core API group)
Explanation

The apps/v1 API group contains workload resources including Deployments, StatefulSets, DaemonSets, and ReplicaSets. The core v1 group contains Pods and Services, while batch/v1 contains Jobs and CronJobs.

Q51 Hard

When implementing egress traffic control in OpenShift using network policies, what must you explicitly allow to permit pods to reach external services?

  • A All UDP traffic for DNS and all TCP traffic for applications
  • B Only HTTPS traffic on port 443 to any destination
  • C Ingress rules for the target services only, without explicit egress rules
  • D Any DNS traffic and the specific protocol/port combinations for the target services ✓ Correct
Explanation

Network policies must explicitly allow DNS (typically UDP port 53) for name resolution and then allow the specific protocols and ports needed to reach external services. Without these rules, pods cannot reach external resources.

Q52 Medium

You need to configure network policies to restrict traffic between namespaces in your OpenShift cluster. Which resource type should you use to define these restrictions?

  • A SecurityContextConstraints
  • B NetworkPolicy ✓ Correct
  • C PodSecurityPolicy
  • D EgressNetworkPolicy
Explanation

NetworkPolicy is the standard Kubernetes resource for defining network traffic rules between pods and namespaces. While EgressNetworkPolicy exists in OpenShift, NetworkPolicy is the primary and recommended approach for comprehensive network segmentation.

Q53 Medium

Your cluster has multiple projects with different resource quotas. A developer reports that their pod deployment is being rejected. What is the most likely cause if the pod spec is valid?

  • A The image registry is unreachable
  • B The node selector does not match any available nodes
  • C The namespace has reached its ResourceQuota limits ✓ Correct
  • D The pod violates SecurityContextConstraints
Explanation

ResourceQuotas limit the total amount of compute resources (CPU, memory) and object counts that can be used within a namespace. If a valid pod cannot be created, the namespace quota has likely been exceeded.

Q54 Hard

You are configuring RBAC for a service account that needs to manage deployments across multiple namespaces. Which approach is most appropriate?

  • A Create a ClusterRole and bind it with a ClusterRoleBinding for each namespace
  • B Create a single ClusterRole and use multiple ClusterRoleBindings referencing the same service account ✓ Correct
  • C Create a Role in each namespace and bind it with RoleBindings to a cluster-scoped service account
  • D Create a ClusterRole and configure it with namespace selectors in the roleRef
Explanation

ClusterRoles define permissions at the cluster level and can be bound to a single service account across multiple namespaces using multiple ClusterRoleBindings. This avoids role duplication and maintains a single source of truth for permissions.

Q55 Medium

When using the OpenShift Container Platform image registry, what is the purpose of the ImageStream resource?

  • A To optimize container image compression and storage efficiency
  • B To enforce image scanning and vulnerability compliance policies
  • C To provide an abstraction layer that tracks available image tags and integrates with deployments for automatic updates ✓ Correct
  • D To manage image pull secrets and authentication credentials across the cluster
Explanation

ImageStreams abstract container images and track tags, allowing deployments to automatically update when new images are pushed. They also integrate with builds and deployments for automated workflows.

Q56 Hard

You need to implement a custom admission controller in your OpenShift cluster. Which two resources can you use to achieve this? (Select the most accurate pair)

  • A AdmissionController and WebhookConfiguration
  • B ValidatingWebhook and MutatingWebhook
  • C ValidatingAdmissionPolicy and ValidatingWebhookConfiguration
  • D MutatingWebhookConfiguration and ValidatingWebhookConfiguration ✓ Correct
Explanation

ValidatingWebhookConfiguration and MutatingWebhookConfiguration are the resources that define custom admission webhooks in Kubernetes/OpenShift, allowing validation and mutation of API requests respectively.

Q57 Medium

An administrator needs to ensure that all pods in a specific namespace run with restricted SELinux contexts. Where should this policy be enforced?

  • A In the ClusterRole permissions for the namespace
  • B In the Pod specification itself
  • C In the SecurityContextConstraints assigned to the namespace's default service account ✓ Correct
  • D In the NetworkPolicy resource for that namespace
Explanation

SecurityContextConstraints (SCCs) in OpenShift enforce security policies at the namespace level by restricting what capabilities, SELinux contexts, and privileged modes pods can use. They are applied to service accounts within a namespace.

Q58 Medium

You are troubleshooting a persistent volume (PV) that remains in an Unbound state. Which of the following is the most common reason for this issue?

  • A The PersistentVolumeClaim specifies a storageClassName that does not exist or does not match the PV's storageClassName ✓ Correct
  • B The PV's access mode is Read-Write-Many but the underlying storage backend only supports Read-Write-Once
  • C The cluster's kube-controller-manager service is running on a node with insufficient memory
  • D The node where the volume is attached does not have the required iSCSI initiator installed
Explanation

A PV remains Unbound when no matching PersistentVolumeClaim can claim it. The most common reason is a mismatch in storageClassName, capacity requirements, or access modes between the PV and available PVCs.

Q59 Medium

Your OpenShift cluster uses dynamic storage provisioning. A developer creates a PersistentVolumeClaim but no PersistentVolume is automatically created. What should you verify first?

  • A Verify that the developer's service account has permission to create PersistentVolumes
  • B Ensure that the storage backend's quota has not been exceeded on the infrastructure level
  • C Confirm that a StorageClass matching the PVC's storageClassName exists and has a valid provisioner configured ✓ Correct
  • D Check that the cluster has enough nodes available to mount the volume
Explanation

Dynamic provisioning requires a StorageClass with a valid provisioner. If the StorageClass doesn't exist or is misconfigured, the provisioner cannot create a PV automatically.

Q60 Hard

You are implementing a multi-tenant cluster where different business units need isolated container registries. Which approach best aligns with OpenShift best practices?

  • A Deploy a separate OpenShift cluster for each business unit to ensure complete isolation
  • B Implement namespace-level resource quotas as the primary isolation mechanism for image registry access
  • C Use OpenShift projects with RBAC controls on ImageStreams and image pull secrets scoped to specific service accounts ✓ Correct
  • D Configure external image registries for each business unit and manage authentication through cluster-wide pull secrets only
Explanation

Using projects (namespaces) with RBAC on ImageStreams and scoped pull secrets provides multi-tenancy within a single cluster while maintaining proper isolation and security boundaries for each business unit.

Q61 Easy

When configuring a BuildConfig for a CI/CD pipeline, you need to trigger builds automatically when source code is pushed to your Git repository. Which mechanism should you configure?

  • A A deployment trigger that automatically rebuilds when the pod template changes
  • B An ImageStream trigger that monitors for new image tags in the internal registry
  • C A CronJob resource that polls the Git repository on a schedule
  • D A GitHub webhook pointing to the BuildConfig's generic webhook URL ✓ Correct
Explanation

GitHub webhooks (or equivalent for other Git providers) automatically notify OpenShift when code is pushed, triggering builds through the BuildConfig's generic webhook endpoint. This provides immediate feedback for CI/CD pipelines.

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