Courseiva

CCNA Application Deployment And Lifecycle Questions

70 questions · Application Deployment And Lifecycle topic · All types, answers revealed

1
MCQmedium

What is the primary difference between a Deployment and a DeploymentConfig in OpenShift?

A.Deployments support triggers, DeploymentConfigs do not
B.Deployments can be scaled, DeploymentConfigs cannot
C.DeploymentConfigs are OpenShift-specific
D.DeploymentConfigs do not support rollbacks
AnswerC

DeploymentConfigs are unique to OpenShift, whereas Deployments are standard Kubernetes.

Why this answer

DeploymentConfigs are native OpenShift objects that support triggers and lifecycle hooks, while Deployments are standard Kubernetes resources.

2
MCQhard

You have a build that fails because it requires access to a private repository. What is the correct way to provide credentials to the build?

A.Associate a secret with the BuildConfig
B.Hardcode credentials in the Dockerfile
C.Use an environment variable in the deployment
D.Mount a ConfigMap
AnswerA

Using a secret is the secure way to provide credentials for source code repositories.

Why this answer

You can add a Secret to the BuildConfig that contains the credentials for the private repository.

3
MCQmedium

You need to update an application without downtime. Which deployment strategy is most appropriate?

A.Canary
B.Blue-Green
C.Recreate
D.Rolling
AnswerD

Rolling updates replace pods one by one or in batches, avoiding downtime.

Why this answer

The Rolling strategy replaces pods incrementally, ensuring capacity is maintained throughout.

4
MCQhard

An administrator needs to roll back a Deployment in OpenShift to a specific previous revision because the latest update introduced a critical database connection bug. Which command identifies the available revisions and their associated change causes before executing the rollback?

A.oc get replicasets --selector=app=my-app
B.oc get deployment/<deployment-name> -o yaml
C.oc describe deploymentconfig <deployment-config-name>
D.oc rollout history deployment/<deployment-name>
AnswerD

'oc rollout history' displays all recorded revisions for a deployment along with their change causes.

Why this answer

The 'oc rollout history' command lists the deployment revisions and their associated change causes.

5
MCQhard

An administrator needs to perform a canary deployment strategy using standard OpenShift Deployment resources (not DeploymentConfigs). What is the standard Kubernetes/OpenShift native mechanism to route a small percentage of traffic to the canary deployment?

A.Setting the traffic-split annotation on the Deployment resource
B.Using an OpenShift Route with weighted backend services pointing to stable and canary Services
C.Configuring weight parameters directly in the Deployment spec rollingUpdate strategy
D.Enabling canary mode in the ImageStream tag metadata
AnswerB

OpenShift Routes support weighted traffic distribution across multiple Services to implement canary routing.

Why this answer

Standard Deployments do not have native percentage-based traffic splitting; an administrator must use a Service with multiple underlying selector labels alongside a Service Mesh, Ingress controller, or an OpenShift Route with weight configurations pointing to distinct Services. Specifically, OpenShift Routes support splitting traffic via weighted backends across multiple Services.

6
MCQeasy

An ImageStream named 'frontend' in a project contains multiple tags, including 'latest' and 'v1.0'. You want to update an existing Deployment to specifically use the 'v1.0' tag of this ImageStream. Where must this reference be updated in the Deployment specification?

A.In the spec.imageStreamRef field.
B.In the metadata.annotations['openshift.io/image.in-cluster'] field.
C.In the spec.template.spec.containers[].image field pointing to image-registry.openshift-image-registry.svc:5000/namespace/frontend:v1.0.
D.In the spec.strategy.rollingUpdate.image field.
AnswerC

Deployments reference ImageStreams via the internal registry URL path format namespace/imagestream:tag.

Why this answer

ImageStreamTags or ImageStreamImages are referenced inside the container image field within the pod template of a Deployment.

7
MCQmedium

You need to ensure that your application deployment always maintains at least 80% of its desired pod count during a rolling update. Which strategy parameter should you configure?

A.maxUnavailable: 20%
B.minReadySeconds: 20
C.maxSurge: 20%
D.rollingUpdatePeriod: 20%
AnswerA

Setting maxUnavailable to 20% allows the deployment to tolerate a 20% reduction in capacity, maintaining 80% availability.

Why this answer

The maxUnavailable parameter defines the maximum number of pods that can be unavailable during the update process. Setting this to 20% ensures 80% availability.

8
MCQeasy

An administrator needs to completely remove a Helm release named my-redis from the cluster, including its history. Which Helm command should be executed?

A.helm remove my-redis
B.helm delete my-redis --purge
C.helm uninstall my-redis
D.helm drop my-redis
AnswerC

helm uninstall removes all resources associated with the release and deletes the release history.

Why this answer

The helm uninstall command removes the release and its associated history from the cluster.

9
MCQeasy

A developer has deployed a Helm chart in OpenShift and needs to list all currently installed Helm releases in the current namespace. Which command should be used?

A.helm get releases
B.helm status
C.helm search installed
D.helm list
AnswerD

helm list displays all installed releases in the active namespace.

Why this answer

The helm list command shows all active Helm releases in the current namespace.

10
MCQhard

You notice that your builds are failing due to a lack of memory. Where can you set resource limits for the build process?

A.In the BuildConfig resources field
B.In the LimitRange
C.In the project Quota
D.In the Deployment object
AnswerA

The resources field in the BuildConfig specifies limits for the build pod.

Why this answer

You can define 'resources' in the 'spec' of the BuildConfig to control CPU/Memory for the build pod.

11
MCQhard

A developer has created a Kustomization file that applies a namespace prefix and some patches to base Kubernetes manifests. How can the developer apply these manifests to an OpenShift cluster using standard oc tooling without installing standalone Kustomize?

A.oc create -f kustomization.yaml
B.oc run -k ./directory
C.oc apply -k ./directory
D.oc kustomize apply ./directory
AnswerC

oc apply -k directs the client to build and apply the Kustomize package from the directory.

Why this answer

The oc apply command includes built-in support for Kustomize via the -k flag, which processes a directory containing a kustomization.yaml file.

12
Multi-Selecthard

Which THREE methods can be used to pass parameters or configuration values into a Helm chart installation in OpenShift? (Choose three.)

Select 3 answers
A.Relying on the default values defined in the chart's values.yaml file
B.Directly modifying the deployed Kubernetes Pod annotations via oc patch
C.Passing individual key-value pairs using the --set flag on the CLI
D.Supplying a custom YAML configuration file using the --values flag
E.Injecting values through the cluster-wide OAuth configuration map
AnswersA, C, D

Charts inherently utilize the default values defined in their packaged values.yaml file.

Why this answer

Helm values can be supplied via the --set flag for inline values, the --values (-f) flag for YAML files, and by setting environment variables or default values within the chart's values.yaml file.

13
MCQeasy

An administrator needs to view the rollout history of a DeploymentConfig named web-frontend. Which command accomplishes this?

A.oc rollout history dc/web-frontend
B.oc describe dc/web-frontend
C.oc get revisions dc/web-frontend
D.oc log rollout dc/web-frontend
AnswerA

oc rollout history lists past revisions and configurations for the specified deployment resource.

Why this answer

The oc rollout history command displays the revision history for a Deployment or DeploymentConfig.

14
MCQeasy

An administrator needs to deploy a containerized web application using a Git repository as the source without writing a Dockerfile. Which OpenShift build strategy should be used?

A.Source-to-Image (S2I) strategy
B.Docker strategy
C.Custom strategy
D.Pipeline strategy
AnswerA

S2I allows building runnable images from source code without a Dockerfile.

Why this answer

The Source-to-Image (S2I) build strategy builds reproducible container images from source code without requiring a Dockerfile, injecting the source code into a builder image.

15
Multi-Selectmedium

When managing application lifecycles and rollouts using standard Kubernetes Deployments in OpenShift 4.14, which TWO parameters are explicitly configurable under the rollingUpdate strategy settings? (Choose two.)

Select 2 answers
A.maxSurge
B.minReadySeconds
C.timeoutSeconds
D.rollbackWindow
E.maxUnavailable
AnswersA, E

maxSurge defines the maximum number of pods that can be created over the desired number of pods during a update.

Why this answer

The rollingUpdate strategy for deployments supports maxSurge and maxUnavailable parameters to control the pace and capacity during updates.

16
MCQmedium

A DeploymentConfig in OpenShift has a Rolling strategy defined. Which parameter in the strategy configuration controls the maximum number of pods that can be created above the desired replica count during the update?

A.interval
B.maxSurge
C.updatePeriodSeconds
D.maxUnavailable
AnswerB

maxSurge specifies the maximum number of extra pods allowed during the rollout.

Why this answer

maxSurge controls how many pods can be scheduled above the desired number of pods during a rolling update.

17
MCQhard

An OpenShift cluster administrator needs to ensure that custom S2I builder images stored in an insecure internal registry can be successfully pulled by build pods without failing TLS verification. Where must the insecure registry be defined?

A.In the OAuth client definition
B.In the cluster Image resource configuration (imageregistry.config.openshift.io/cluster or image.config.openshift.io)
C.In the individual BuildConfig strategy environment variables
D.In the Project request template metadata
AnswerB

Cluster-wide image configuration defines registries that are insecure or require specific trust stores.

Why this answer

Insecure registries must be configured in the cluster-wide Image.config.openshift.io/cluster resource (or registry configuration) so the container runtime and build machinery trust the registry.

18
MCQhard

An administrator needs to deploy a Helm chart into an OpenShift cluster while overriding specific chart values using a local YAML file. Which Helm CLI command should be executed?

A.helm push my-chart --override overrides.yaml
B.helm install my-release my-chart --values overrides.yaml
C.helm deploy my-release my-chart --values overrides.yaml
D.helm apply -f overrides.yaml my-chart
AnswerB

helm install creates a release from a chart and accepts custom values files via --values.

Why this answer

The helm install command with the -f or --values flag allows supplying a YAML file to override default chart values.

19
MCQmedium

An OpenShift administrator needs to trigger a rollback of a Deployment to its previous working revision after a failed update. Which oc command should be used?

A.oc update deployment/my-app --revision=previous
B.oc rollout undo deployment/my-app
C.oc revert deployment/my-app
D.oc rollback deployment/my-app
AnswerB

oc rollout undo reverts the deployment to the previous or specified revision.

Why this answer

The oc rollout undo command reverts a deployment back to a previous revision in the rollout history.

20
MCQmedium

An administrator wants to pause rollouts on a DeploymentConfig named backend-api to make multiple configuration changes without triggering intermediate builds or rollouts. Which command pauses the rollout?

A.oc patch dc/backend-api --type=json -p='[{"op": "add", "path": "/spec/paused", "value": true}]'
B.oc suspend dc/backend-api
C.oc stop rollout dc/backend-api
D.oc rollout pause dc/backend-api
AnswerD

oc rollout pause marks the deployment as paused, preventing automatic rollouts until resumed.

Why this answer

The oc rollout pause command suspends rollout updates on a Deployment or DeploymentConfig.

21
Multi-Selecteasy

Which TWO commands are typically used to check the status of an application rollout?

Select 2 answers
A.oc get dc
B.oc rollout status
C.oc build logs
D.oc trigger
E.oc watch
AnswersA, B

Lists the current state of DeploymentConfigs.

Why this answer

Both 'oc rollout status' and 'oc get dc' provide insight into the current state of a deployment.

22
Multi-Selecthard

An administrator needs to configure a Deployment strategy in OpenShift. Which THREE deployment strategy types are natively supported by standard Kubernetes/OpenShift Deployments? (Choose three.)

Select 3 answers
A.Rolling (for DeploymentConfigs) / RollingUpdate (for Deployments)
B.BlueGreen
C.Recreate
D.Canvas
E.RollingUpdate
AnswersA, C, E

Rolling / RollingUpdate is a standard strategy across Deployment and DeploymentConfig objects.

Why this answer

Standard Kubernetes Deployments support RollingUpdate. OpenShift-specific DeploymentConfigs support Rolling, Recreate, and Custom strategies. Standard Deployments specifically use RollingUpdate natively.

Recreate is also supported by standard Deployments. (Note: Standard Deployments support Recreate and RollingUpdate strategies under .spec.strategy.type).

23
MCQmedium

You need to deploy a Node.js application from a Git repository using Source-to-Image (S2I) on OpenShift 4.14, and you want to ensure the build triggers automatically whenever a new image is pushed to the dependent base ImageStream. Which BuildConfig strategy and configuration element achieves this?

A.Configure a Docker build with a ConfigChange trigger on the DeploymentConfig.
B.Configure a Source build with an ImageChange trigger on the input ImageStreamTag.
C.Configure a Pipeline build referencing a Tekton pipeline with manual execution parameters.
D.Configure a Custom build with a GitHub webhook trigger referencing the source repository.
AnswerB

An ImageChange trigger monitors the base ImageStreamTag and automatically initiates a new build when the base image updates.

Why this answer

Using the source strategy in a BuildConfig along with triggers of type ImageChange allows the build to automatically run when the referenced ImageStreamTag changes.

24
MCQmedium

How do you view the history of deployments for a DeploymentConfig?

A.oc rollout history
B.oc show history
C.oc describe dc
D.oc get history
AnswerA

This displays the history of rollout revisions.

Why this answer

The 'oc rollout history' command lists the revisions of a deployment.

25
MCQeasy

Which resource in OpenShift acts as an abstraction over a set of images to provide a stable reference?

A.DeploymentConfig
B.BuildConfig
C.Route
D.ImageStream
AnswerD

ImageStreams provide a stable reference to images.

Why this answer

An ImageStream creates a single virtual view of an image, even if the underlying image tag changes.

26
MCQmedium

You want to prevent a specific pod from being scheduled on nodes that are already running other pods of the same application. What should you configure?

A.Pod anti-affinity
B.Tolerations
C.Node selector
D.Resource quotas
AnswerA

Anti-affinity rules prevent pods from landing on nodes with specific labels or existing pods.

Why this answer

Pod anti-affinity allows you to specify rules to keep pods of the same application apart.

27
Multi-Selecthard

Which THREE of the following mechanisms can be used to automatically trigger a new build in an OpenShift BuildConfig? (Choose three.)

Select 3 answers
A.Route health-check trigger
B.ImageChange trigger
C.CronJob schedule trigger
D.Webhook trigger (GitHub or Generic)
E.ConfigChange trigger
AnswersB, D, E

An ImageChange trigger initiates a build whenever the referenced ImageStreamTag changes.

Why this answer

BuildConfigs support webhook triggers (GitHub, Generic), image change triggers (when a base image updates), and configuration change triggers (when the BuildConfig itself changes).

28
MCQhard

You have a S2I build that fails because the builder image is not accessible by the restricted ServiceAccount. What is the most secure way to resolve this?

A.Change the build strategy to Docker
B.Make the ImageStream public
C.Grant the 'system:image-puller' role to the ServiceAccount
D.Create an ImagePullSecret for the ServiceAccount
AnswerC

This grants the necessary permissions to pull images from other namespaces.

Why this answer

Granting the 'system:image-puller' role to the ServiceAccount in the namespace where the image exists allows the builder to pull the image.

29
Multi-Selectmedium

Which TWO deployment triggers are supported by a DeploymentConfig?

Select 2 answers
A.Manual
B.ConfigChange
C.ImageChange
D.Cron
E.Webhook
AnswersB, C

Triggers on DC changes.

Why this answer

DeploymentConfigs natively support ImageChange and ConfigChange triggers.

30
MCQmedium

When configuring a custom build strategy, where do you define the Dockerfile to use?

A.In the strategy block of the BuildConfig
B.In the DeploymentConfig
C.In the Build object
D.In the ImageStream
AnswerA

The strategy section contains the build process details including the Dockerfile source.

Why this answer

In the BuildConfig, under the 'strategy' block, you can specify the Dockerfile context or explicitly define the Dockerfile source.

31
Multi-Selecthard

Which THREE items are contained within a Helm Chart structure?

Select 3 answers
A.Dockerfile
B.values.yaml
C.Chart.yaml
D.templates/ directory
E.ImageStream
AnswersB, C, D

The default configuration file.

Why this answer

A chart contains metadata (Chart.yaml), templates, and values.

32
MCQhard

A production Deployment using the Rolling update strategy is failing its readiness probe during a rollout, causing the update to block and eventually time out. You need to inspect the reason for the rollout failure using the OpenShift CLI without deleting the failing pods immediately. Which oc command provides the most direct diagnostic information regarding the rollout status and blockage reason?

A.oc rollout status deployment/<deployment-name>
B.oc get events --sort-by='.metadata.creationTimestamp'
C.oc describe deployment <deployment-name>
D.oc debug deployment/<deployment-name>
AnswerA

'oc rollout status' reports the current status of the rollout and indicates why it is failing or waiting.

Why this answer

The 'oc rollout status' command monitors the progress of a deployment and provides direct feedback on why a rollout is blocked.

33
Multi-Selecteasy

Which THREE of the following are valid build strategies supported by OpenShift BuildConfigs? (Choose three.)

Select 3 answers
A.Jenkinsfile
B.Custom
C.Source
D.HelmBuild
E.Docker
AnswersB, C, E

The Custom strategy allows users to define a builder image that executes a custom build process.

Why this answer

OpenShift supports Source (S2I), Docker, Custom, and Pipeline build strategies.

34
MCQeasy

Which command-line argument can you use to change the output format of 'oc get' to YAML?

A.-o yaml
B.--format yaml
C.--yaml
D.-f yaml
AnswerA

This correctly outputs the object in YAML format.

Why this answer

The -o (or --output) flag is used to specify the output format, such as yaml or json.

35
MCQeasy

Which command allows you to view the logs of a specific build?

A.oc get build
B.oc describe build
C.oc logs [pod-name]
D.oc logs build/[build-name]
AnswerD

This command retrieves the logs for the specified build.

Why this answer

The 'oc logs' command is used to stream the logs of a build pod or the build process itself.

36
MCQmedium

You are using Kustomize to manage environment-specific configurations. Which file must be present in the base directory to define resources?

A.base.yaml
B.overlay.yaml
C.kustomization.yaml
D.resources.yaml
AnswerC

Kustomize looks for this file to identify resources and patches.

Why this answer

The kustomization.yaml file is the configuration file that directs Kustomize on how to manage the resources.

37
Multi-Selecthard

Which THREE pieces of data can an ImageStream reference?

Select 3 answers
A.Internal registry image
B.Specific image tag
C.Git repository
D.External registry image
E.DeploymentConfig
AnswersA, B, D

Points to cluster-managed images.

Why this answer

An ImageStream can point to an external registry image, a local internal registry image, or a specific tag.

38
Multi-Selecthard

An administrator is troubleshooting a failed OpenShift build. Which THREE resources or logs should the administrator check to diagnose the failure? (Choose three.)

Select 3 answers
A.The logs of the specific build pod using oc logs build/<build-name>
B.The cluster-wide storage class definitions
C.The BuildConfig object specification using oc get bc/<name> -o yaml
D.The default OAuth client secret
E.The namespace events using oc get events
AnswersA, C, E

Build logs show the exact output and failure point of the build execution.

Why this answer

To diagnose build failures, checking the BuildConfig definition, the specific Build object logs via oc logs build/<build-name>, and the events in the namespace provides comprehensive diagnostic data.

39
Multi-Selectmedium

When managing ImageStreams in OpenShift, which TWO tasks can an administrator perform using oc commands? (Choose two.)

Select 2 answers
A.Creating an alias or tag pointing one ImageStream tag to another using oc tag
B.Running unit tests against container image layers using oc test-image
C.Compiling raw source code into an executable binary using oc tag
D.Importing images from an external container registry into an ImageStream using oc import-image
E.Directly modifying kernel parameters on worker nodes via oc image
AnswersA, D

oc tag allows mapping tags between ImageStreams or external images.

Why this answer

Administrators can import image tags from external registries using oc import-image and tag images using oc tag.

40
MCQhard

You have a Helm chart that requires custom values for different environments. Which flag allows you to pass a custom values file?

A.--override
B.--config
C.--set-file
D.--values
AnswerD

The --values (or -f) flag imports a YAML file into the chart's values context.

Why this answer

The '-f' or '--values' flag is used to specify a YAML file containing override values.

41
MCQhard

You need to perform a canary deployment by shifting traffic between two versions of your app. What is the standard way to accomplish this in OpenShift without using a Service Mesh?

A.Create two separate Routes
B.Modify the Deployment strategy
C.Use the 'oc scale' command
D.Use Route weights
AnswerD

OpenShift Routes support splitting traffic between services using weight parameters.

Why this answer

By adjusting the weights of the 'alternate backends' in a Route, you can control traffic splitting.

42
Multi-Selectmedium

An administrator needs to create a new OpenShift build using a BuildConfig. Which TWO build strategies are natively supported out-of-the-box by OpenShift? (Choose two.)

Select 2 answers
A.Source (S2I)
B.Ansible
C.Knative
D.Helm
E.Docker
AnswersA, E

Source-to-Image is a core native OpenShift build strategy.

Why this answer

OpenShift natively supports Source (S2I), Docker, Custom, and Pipeline build strategies.

43
Multi-Selecthard

Which THREE things can you configure in a BuildConfig?

Select 3 answers
A.Build Strategy
B.Source Code Reference
C.Replicas
D.Triggers
E.Route settings
AnswersA, B, D

Defines how the image is built.

Why this answer

BuildConfig allows configuration of triggers, strategies, and source references.

44
MCQhard

An administrator needs to configure a BuildConfig so that whenever a new image is pushed to a dependent ImageStream tag, a new build is automatically triggered. Which trigger type must be added to the BuildConfig?

A.Webhook
B.Periodic
C.ImageChange
D.ConfigChange
AnswerC

ImageChange triggers a build whenever the referenced ImageStream tag is updated.

Why this answer

An ImageChange build trigger automatically starts a new build when the referenced ImageStream tag changes.

45
MCQeasy

You want to trigger a new build automatically whenever the base image in an ImageStream changes. What must be enabled in the BuildConfig?

A.Continuous Deployment trigger
B.WebHook trigger
C.ConfigChange trigger
D.ImageChange trigger
AnswerD

The ImageChange trigger watches the ImageStream and initiates a build on updates.

Why this answer

An ImageChange trigger allows the BuildConfig to react to changes in a specific ImageStreamTag.

46
MCQmedium

What is the purpose of the 'postCommit' hook in a BuildConfig?

A.To notify an external system
B.To run tests on the image
C.To push the image to an external registry
D.To restart the Deployment
AnswerB

It provides a stage to run validation checks within the build container.

Why this answer

The postCommit hook allows you to run commands or tests inside the container after the image is built but before it is pushed.

47
Multi-Selectmedium

Which TWO of the following are valid ways to trigger a build in OpenShift?

Select 2 answers
A.Restarting the OpenShift cluster
B.Sending a HTTP POST to the webhook URL
C.Executing 'oc start-build'
D.Updating a ConfigMap
E.Changing a Namespace
AnswersB, C

Webhooks are standard triggers.

Why this answer

Builds can be triggered by manual user command or by a configured webhook.

48
Multi-Selectmedium

An administrator is configuring a DeploymentConfig in OpenShift and wants to set up automated triggers for new rollouts. Which TWO trigger types are natively supported in a DeploymentConfig spec? (Choose two.)

Select 2 answers
A.PeriodicTrigger
B.ConfigChange
C.WebhookTrigger
D.GitTrigger
E.ImageChange
AnswersB, E

ConfigChange is a native DeploymentConfig trigger type that rolls out a new revision when the DC template changes.

Why this answer

DeploymentConfigs support ConfigChange (triggering when the DeploymentConfig template changes) and ImageChange (triggering when a referenced ImageStream tag updates).

49
Multi-Selecthard

Which THREE actions can be performed using the oc rollout subcommand in OpenShift? (Choose three.)

Select 3 answers
A.Pausing a rollout to make multiple configuration updates
B.Triggering a direct source build from a local directory
C.Viewing the revision history of a deployment
D.Checking the current status of an ongoing rollout
E.Scaling the number of replicas up or down
AnswersA, C, D

oc rollout pause suspends automatic deployments.

Why this answer

oc rollout supports history, undo, pause, resume, and status. It does not support build or scale directly as primary subcommands.

50
MCQeasy

Which OpenShift resource defines the desired state of a containerized application, including replica count and image version?

A.Deployment
B.Pod
C.ImageStream
D.Service
AnswerA

Deployments manage the desired state of replica sets.

Why this answer

A Deployment (or DeploymentConfig) object defines the desired state of the pods.

51
Multi-Selecthard

Which THREE components are part of a Kustomize configuration?

Select 3 answers
A.kustomization.yaml
B.BuildConfigs
C.Resources
D.Helm Charts
E.Patches
AnswersA, C, E

The main entry point.

Why this answer

Kustomize uses resources, patches, and a kustomization file to manage deployment overrides.

52
MCQmedium

A BuildConfig uses an S2I strategy and needs to pull private base images from a secured external container registry. Where must the administrator configure the pull credentials so the builder pod can authenticate?

A.In the ImageStream tag policy
B.In the Route resource annotations
C.In the global cluster OAuth configuration
D.In the BuildConfig spec under strategy.dockerStrategy.pullSecret or source/strategy configuration
AnswerD

Build configs support pullSecret configurations to authenticate against private registries during image pulls.

Why this answer

BuildConfig objects use pushSecret or pullSecret configurations, specifically output.pushSecret for pushing images and source.secrets or a service account for pulling source/base images, but standard registry access for builds is often tied to the builder service account or a specified pushSecret/pullSecret. More precisely, pullSecret in the source or strategy block allows authenticating to registries.

53
MCQeasy

Which command is used to start a new build from an existing BuildConfig named 'frontend'?

A.oc trigger-build frontend
B.oc run-build frontend
C.oc start-build frontend
D.oc build frontend
AnswerC

This is the correct command syntax to trigger a build.

Why this answer

The 'oc start-build' command triggers a new build for the specified BuildConfig.

54
MCQmedium

A developer is using Kustomize to manage environment overlays (dev and prod) for an OpenShift application. Where should the common base resources be referenced in the prod/kustomization.yaml file?

A.Under the includes: key
B.Under the bases: key
C.Under the resources: key
D.Under the overlays: key
AnswerC

Kustomize uses the resources field to include base directories or dependent manifest files.

Why this answer

Kustomize overlays reference shared base manifests using the resources field pointing to the relative path of the base directory.

55
MCQmedium

During an S2I build, an administrator needs to pass sensitive build arguments, such as subscription keys, without hardcoding them into the BuildConfig or exposing them in the final image history. How should this be handled?

A.Storing them in an ImageStream annotation
B.Using build secrets mounted via the source secret or build strategy configuration
C.Defining them as plain environment variables in the BuildConfig spec
D.Injecting them via the Route host header
AnswerB

Build secrets can be securely mounted into the builder pod during the build process without being baked into the final image layers.

Why this answer

Secret mounting during builds allows referencing Kubernetes Secrets as build secrets that are available during the build process but not persisted in the output image layers.

56
MCQmedium

You are troubleshooting a BuildConfig that fails during the source clone phase due to an untrusted custom internal Certificate Authority (CA) used by your corporate Git server. Where must you configure the custom CA certificate so that the OpenShift cluster's build pods trust the Git server during S2I builds?

A.In the global cluster proxy configuration under spec.trustedCA.
B.In a ConfigMap referenced by the build.openshift.io/inject-trusted-cabundle annotation or build defaults in the cluster.
C.In the Node configuration file on each worker node under /etc/origin/node/.
D.In the imagestream spec.trust.ca field.
AnswerB

OpenShift allows injecting trusted CA bundles into build pods via a designated ConfigMap linked in the cluster configuration or build settings.

Why this answer

Configuring a configmap containing the CA certificate in the openshift-config namespace and referencing it in the cluster-wide proxy or BuildConfig config map annotations allows builds to trust internal CAs. Specifically, custom CA certificates for builds are added via a ConfigMap referenced in the build configuration or global cluster configuration.

57
MCQeasy

A developer wants to inspect the generated Kubernetes manifests from a Helm chart without actually installing the chart into the OpenShift cluster. Which Helm command should be used?

A.helm dry-run my-release my-chart
B.helm template my-release my-chart
C.helm show chart my-chart
D.helm inspect values my-chart
AnswerB

helm template renders the chart locally and prints the resulting manifests.

Why this answer

The helm template command renders the chart locally and outputs the resulting manifest YAML to stdout without installing it.

58
Multi-Selectmedium

Which TWO of the following are valid deployment strategies supported by OpenShift?

Select 2 answers
A.Parallel
B.Sequential
C.Recreate
D.Rolling
E.Canary
AnswersC, D

Standard strategy that replaces all pods.

Why this answer

Rolling and Recreate are the primary native strategies.

59
MCQhard

How do you define a health check that verifies if your application is ready to start receiving traffic?

A.ReadinessProbe
B.StartupProbe
C.LivenessProbe
D.HealthProbe
AnswerA

Readiness probes determine if the pod can accept traffic.

Why this answer

A ReadinessProbe checks if the container is ready to accept requests. If it fails, the pod is removed from service endpoints.

60
Multi-Selectmedium

Which TWO pieces of information are needed when defining a new Helm repository?

Select 2 answers
A.Chart version
B.Username
C.Namespace
D.Repository Name
E.Repository URL
AnswersD, E

Required for naming the local repo.

Why this answer

You need the name and the URL of the repository.

61
Multi-Selectmedium

Which TWO of the following can be used to troubleshoot a failing deployment?

Select 2 answers
A.oc rollout undo
B.oc describe deployment
C.oc logs
D.oc delete project
E.oc start-build
AnswersB, C

Shows status and events.

Why this answer

Describing the deployment and checking the pod logs are standard troubleshooting steps.

62
Multi-Selectmedium

Which TWO statements are true regarding Kustomize usage within OpenShift? (Choose two.)

Select 2 answers
A.Kustomize replaces the Kubernetes API server entirely during resource creation.
B.Kustomize is natively integrated into the oc command line tool using the -k flag.
C.Kustomize requires a centralized chart repository server similar to ChartMuseum.
D.Kustomize allows modifying base manifests using patches and name prefixes/suffixes.
E.Kustomize requires writing complex Go templates with conditional logic statements.
AnswersB, D

oc apply -k and oc kustomize natively support building and applying Kustomize directories.

Why this answer

Kustomize is integrated directly into the oc command-line tool via the -k flag, and it allows managing declarative resource overlays without template engines like Helm.

63
MCQeasy

A developer wants to track multiple versions and tags of container images within an OpenShift cluster efficiently. Which OpenShift resource provides this capability?

A.Route
B.ImageStream
C.DeploymentConfig
D.BuildConfig
AnswerB

ImageStreams provide a mechanism for abstracting and tracking image versions and tags.

Why this answer

ImageStreams allow developers to combine and track multiple versions of container images through tags without needing to manage the raw registry image references directly.

64
MCQmedium

When creating a build using S2I, what does the 'assemble' script do?

A.Sets up the user environment
B.Starts the application
C.Downloads the base image
D.Builds the application artifacts
AnswerD

The assemble script performs the build steps for the application.

Why this answer

The 'assemble' script is responsible for taking the source code, building the artifacts, and installing them into the image.

65
MCQmedium

When performing a 'rollout undo' on a Deployment, what is the default behavior if no revision is specified?

A.Delete the current deployment
B.Return to the state at initial deployment
C.Roll back to the previous revision
D.Roll back to revision 1
AnswerC

By default, it rolls back to the most recent previous state.

Why this answer

The 'rollout undo' command without a revision defaults to rolling back to the previous revision (revision n-1).

66
MCQeasy

Which tool would you use to package an application including its dependencies and configuration for easy distribution in OpenShift?

A.Helm
B.oc build
C.Kustomize
D.S2I
AnswerA

Helm provides a way to package entire applications as charts.

Why this answer

Helm is the standard package manager for Kubernetes and OpenShift applications.

67
Multi-Selecthard

Which THREE items are required to successfully deploy a basic application using S2I?

Select 3 answers
A.BuildConfig
B.External Load Balancer
C.A pre-existing Database
D.Builder Image
E.Source Code
AnswersA, D, E

Defines the build process.

Why this answer

S2I requires source code, a Builder Image, and a BuildConfig to glue them together.

68
MCQmedium

You have modified a set of Kubernetes manifests using Kustomize and want to preview the exact output that will be applied to your OpenShift cluster without actually executing the changes. Which command should you run?

A.oc diff -f kustomization.yaml
B.oc kustomize .
C.oc convert -k .
D.oc apply -k . --dry-run=client
AnswerB

'oc kustomize' processes the kustomization.yaml file and prints the generated manifests to standard output.

Why this answer

The 'oc kustomize' command builds the Kustomize overlay and outputs the resulting raw manifests to stdout.

69
MCQhard

You want to automate the application lifecycle so that every time a code change is pushed, the build and deployment occur automatically. Which combination of features should you use?

A.Only cron jobs
B.Manual build and manual rollout
C.BuildConfig Webhook and ImageStream triggers
D.DeploymentConfigs only
AnswerC

Webhooks trigger builds; ImageStream triggers update deployments.

Why this answer

A GitHub webhook combined with ImageStream triggers creates a fully automated pipeline from code commit to deployment.

70
MCQhard

What is the result of using a 'Recreate' strategy during a deployment?

A.Zero downtime deployment
B.Rolling update
C.Temporary service outage
D.Instant switch
AnswerC

The old pods are shut down before new ones start.

Why this answer

The Recreate strategy terminates all existing instances before creating any new ones, resulting in a temporary service outage.

Ready to test yourself?

Try a timed practice session using only Application Deployment And Lifecycle questions.