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.
Topic: OpenShift in IT Infrastructure · Interview preparation
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?
- When should an answer use Deployment rather than DeploymentConfig?
- How does a rolling update balance progress and availability?
- Why can a new container run without receiving normal service traffic?
- How can you make rollout acceptance explicit in an interview exercise?
- Can a configuration change require a new rollout?
- What should an answer say before proposing rollback?
- References
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 observation | What it establishes | Next question |
|---|---|---|
| Build succeeded | An image-producing step completed | Which artifact was promoted? |
| Desired 3, updated 3, available 2 | The rollout has not met full availability | Which instance is unready and why? |
| Progress deadline exceeded | Progress was not achieved within its deadline | What failed and which response policy applies? |
| All replicas available | Controller availability criteria are met | Does 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 item | Invented checkout requirement | Evidence to retain |
|---|---|---|
| Artifact | Approved image version selected | Immutable image identity and promotion record |
| Availability | Three required replicas available | Relevant workload conditions and timing |
| Behavior | Checkout request returns the intended result | Sanitized request expectation and observed outcome |
| Recovery | Prior release remains data-compatible | Application 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
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Wow
0
Sad
0
Angry
0