OpenShift Interview Questions on Deployments and Rollouts

For deployment interview questions, explain how source and image changes reach a workload, how the rollout controller reports progress, and how the team decides whether the release works. Separate a successful build from a successful deployment and a successful customer request. These original questions follow a fictional checkout release with three desired replicas and one unready instance.

Aug 20, 2024 - 11:16
Updated: 
101.6k

OpenShift in IT Infrastructure · Interview preparation

OpenShift Interview Questions on Deployments and Rollouts

Quick answer: For deployment interview questions, explain how source and image changes reach a workload, how the rollout controller reports progress, and how the team decides whether the release works. Separate a successful build from a successful deployment and a successful customer request. These original questions follow a fictional checkout release with three desired replicas and one unready instance. Product examples use OpenShift Container Platform 4.22 documentation; confirm the actual platform version and configured delivery process before applying a default or proposing a production change.

Key takeaways

  • Track the intended image and configuration through the release.
  • Use Deployments for new application examples in the documented 4.22 scope.
  • Explain readiness separately from process execution and liveness.
  • Define application acceptance checks alongside rollout conditions.
  • Treat rollback as an application and data compatibility decision.

Table of Contents

What is the difference between building and deploying an application?

A build produces an artifact, such as a container image, from specified inputs. A deployment asks the platform to run a selected image with configuration, permissions and resource requirements. A successful build does not establish that the image can start or serve the expected request.

The OpenShift image stream guide describes image references and configurable change notifications. ImageStream objects track related image information; they do not contain the actual image layers. A build or deployment responds to a change only when the relevant trigger or delivery mechanism is configured.

Interview question: a source commit passes its build, but checkout still shows the previous version. Answer by tracing the resulting image, the intended workload reference and the running image identity. Ask whether promotion occurred before blaming the build tool.

When should an answer use Deployment rather than DeploymentConfig?

State the API kind before describing its behavior. OpenShift 4.22 documents Kubernetes Deployments and the older OpenShift DeploymentConfig API. Red Hat's deprecation notice says DeploymentConfig was deprecated beginning with 4.14 and recommends Deployments for new work; deprecation is not the same as immediate removal.

The deployment guide contains material for both kinds, so avoid mixing their triggers, rollout records or timeout settings. A confident answer to a legacy estate can explain the existing kind and a migration review without claiming the team can simply rename it.

For a new fictional checkout service, choose a Deployment and describe its ReplicaSets and Pods. If the interviewer supplies a DeploymentConfig, acknowledge that context and use its matching documentation instead of substituting Kubernetes behavior without explanation.

How does a rolling update balance progress and availability?

A rolling update replaces instances gradually according to the workload's configuration. The Deployment documentation explains maxSurge and maxUnavailable. These govern the allowed temporary replica increase and unavailable replicas during that rollout, subject to the configured values and rounding rules.

Suppose checkout wants three replicas. A release can create new instances while older ones remain, but additional Pods still need capacity and must become ready. A setting that allows a surge does not reserve nodes or guarantee that the new version starts.

Question: does ProgressDeadlineExceeded automatically roll back a Deployment? The condition reports stalled progress; the controller continues retrying. A higher-level delivery system may implement another response, but that response must be established from its configuration. Do not promise an automatic rollback from the condition alone.

Supplied observationWhat it establishesNext question
Build succeededAn image-producing step completedWhich artifact was promoted?
Desired 3, updated 3, available 2The rollout has not met full availabilityWhich instance is unready and why?
Progress deadline exceededProgress was not achieved within its deadlineWhat failed and which response policy applies?
All replicas availableController availability criteria are metDoes the intended business request succeed?

Why can a new container run without receiving normal service traffic?

The probe guide separates startup, readiness and liveness. Readiness describes whether a container is ready for the relevant traffic; a failing readiness probe leaves the container running while its ready state is false. Liveness failure can trigger a restart under the applicable restart behavior.

In the checkout case, two new instances are ready and one cannot reach a required dependency. Ask what the readiness endpoint checks and whether its failure is appropriate for that application's traffic. A check that requires every optional dependency can withdraw otherwise useful instances.

An answer should also distinguish the Service's selection and ports from readiness. The Service documentation explains how ports and target ports map. A ready process listening on a different port can still be unreachable through an incorrectly configured Service.

How can you make rollout acceptance explicit in an interview exercise?

Use separate checks for version replacement, sufficient available replicas and a meaningful request. This offline Python exercise evaluates two invented observations. It does not query Kubernetes or reproduce the controller's full completion logic, and it omits generations, old ReplicaSets and transient rollout behavior.

The first observation has three updated replicas but only two available, and its supplied request result fails. The second meets all three proposed exercise criteria. The request result is an input, not a test performed by the program.

def rollout_checks(desired, updated, available, request_ok):
    return {
        "updated": updated == desired,
        "available": available >= desired,
        "request": request_ok,
    }

for label, values in [
    ("stalled", (3, 3, 2, False)),
    ("accepted", (3, 3, 3, True)),
]:
    checks = rollout_checks(*values)
    print(label + ": " + ", ".join(
        name + "=" + str(passed) for name, passed in checks.items()
    ))
    print("accept=" + str(all(checks.values())))

Expected output:

stalled: updated=True, available=False, request=False
accept=False
accepted: updated=True, available=True, request=True
accept=True

When explaining the output, say why each check exists. Replacing all image references can succeed while availability remains insufficient. Availability can recover while the wrong application behavior remains. In a real release, define the request, expected result and observation window with the application owner before promotion.

Can a configuration change require a new rollout?

It depends on how the application consumes configuration. The ConfigMap documentation explains that environment-variable consumption does not update an existing process automatically. Mounted data can have different update behavior, and the application may still need to reload it.

Question: the ConfigMap contains a new backend address, but checkout keeps using the old one. Ask how the value reaches the process before proposing a restart. An environment value and a file read at startup require a different explanation from an application that watches a mounted file.

Record configuration identity alongside image identity in the release evidence. Otherwise a review can attribute a behavior change to an image even though configuration changed at the same time.

Acceptance itemInvented checkout requirementEvidence to retain
ArtifactApproved image version selectedImmutable image identity and promotion record
AvailabilityThree required replicas availableRelevant workload conditions and timing
BehaviorCheckout request returns the intended resultSanitized request expectation and observed outcome
RecoveryPrior release remains data-compatibleApplication owner decision and recovery procedure

What should an answer say before proposing rollback?

Identify what would return to an earlier state and what would remain changed. An older image may not understand a newly migrated database schema. A workload rollback also does not reverse an external payment, restore deleted data or undo every configuration change.

For the fictional checkout release, ask whether the database change is backward compatible and whether the previous image can use the current configuration. If that is unknown, involve the application and data owners before recommending a version reversal.

Finish the interview answer with a supported decision: hold promotion while the third replica is unready, investigate its dependency, and preserve the intended image and configuration identities. That response connects controller observations to a release decision without claiming that every deployment failure has the same remedy.

Related reading: OpenShift architecture answers; OpenShift developer interview questions; OpenShift failure diagnosis.

References

Frequently Asked Questions

A build produces an artifact, while rollout availability and application behavior require separate checks against the intended release criteria.

Red Hat documents deprecation beginning with 4.14, which does not itself mean immediate API removal from every supported environment.

Readiness failure marks the container unready, while restart behavior is associated with other failures such as a failing liveness check.

The condition reports stalled progress, while any automated rollback policy must come from an explicitly configured higher-level delivery process.

An immutable image identity helps connect the approved artifact to the workload, while mutable tags can refer to different images over time.

It checks arithmetic and supplied booleans for two fictional observations without contacting a cluster or implementing complete Deployment status semantics.

Existing environment-variable values are not automatically refreshed from ConfigMap changes, so review application consumption methods and rollout requirements.

These are original interview practice questions with illustrative answer cues, without claims that an employer or certification provider uses them.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Wow Wow 0
Sad Sad 0
Angry Angry 0
Anjali

I am passionate about technology, invention and big challenging tasks on my to- do list. In terms of the work I am doing also at Bunnyshell, I am most passionate about the technologies that we are using., I'm devoted to delivering content that not only informs but also inspires. Whether you need in- depth analysis pieces, educational attendants, or study- provoking opinion pieces, I draft content that resonates with tech suckers and professionals likewise.