Skip to main content
In this lesson we examine deployments in OpenShift: what they are, how they relate to Kubernetes concepts, and how to manage them using the console and CLI. Key topics covered: DeploymentConfig, image-based triggers, deployment strategies (Rolling, Recreate, Blue/Green, A/B), and common rollout commands.

Deployment concept recap

Deployments in OpenShift map closely to Kubernetes deployments but use OpenShift-specific API kinds and features. Briefly, the object hierarchy is:
  • Container image (built with Docker or S2I)
  • Pod — the smallest deployable unit (one or more containers)
  • ReplicaSet / ReplicationController — ensures the desired number of Pod replicas
  • Deployment / DeploymentConfig — manages lifecycle (rolling upgrades, rollbacks, revision history)
Most apps run a single container per Pod, meaning a Pod is typically a single instance of your application. Replication ensures high availability by running multiple Pod instances.
A slide titled "Deployment Controller" showing red container icons representing containers/PODs organized under a Replication Controller and a larger Deployment Controller. The deployment column also includes three hexagon action icons (download, upload, sync).

OpenShift workflow: BuildConfig, ImageStream, DeploymentConfig

When you add an application to a project in OpenShift, the platform typically creates:
  • A BuildConfig — defines how the image is built.
  • An ImageStream — a logical reference to images produced by builds.
  • A DeploymentConfig — controls application deployment and lifecycle.
In the web console you’ll find deployments under Applications → Deployments. A DeploymentConfig commonly references the image produced by a BuildConfig via an ImageStream tag, declares the replica count, and defines the deployment strategy (for example, Rolling). Triggers determine how deployments run:
  • Manual: Click Deploy in the UI or use the CLI to trigger.
  • Automatic: An image change trigger starts a deployment when the ImageStream tag referenced by the DeploymentConfig is updated (for example, when a build completes).
Example console output and a manual trigger:
You can inspect or edit a DeploymentConfig as YAML from the UI (Actions → Edit YAML). The structure resembles a Kubernetes Deployment but uses the OpenShift API group and kind.
DeploymentConfig (kind: DeploymentConfig) is OpenShift-specific and provides image-change triggers and lifecycle hooks. Kubernetes uses kind: Deployment; many fields are similar, but the API kinds and some behaviors differ.
You can view and edit strategy-related settings (timeout, maxUnavailable, maxSurge, etc.) from the console when configuring rolling or recreate behavior.
A screenshot of a web UI titled "Edit Deployment Configuration" showing deployment strategy settings for a sample webapp (strategy type set to "Rolling", timeout 600 seconds). It includes fields for maximum unavailable pods and surge pods (both set to 25%).

Deployment history and rollback

The OpenShift web console preserves deployment history. Each deployment increments an internal version number. To roll back, choose an earlier version in the history and select Roll Back.
A slide titled "Rollback" showing two web console panels for "sample-webapp-docker." The panels display deployment history on the left and deployment details (status, replicas, template and a "Roll Back" button) on the right.

Deployment strategies

  • Recreate: Terminates all existing Pods, then creates new Pods for the updated version. Suitable when you cannot run multiple versions concurrently, but it causes downtime during the transition.
  • Rolling (default): Updates Pods incrementally so the application remains available. If you don’t choose a strategy, OpenShift uses Rolling by default.
Advanced approaches for safer rollouts:
  • Blue/Green: Deploy a separate “green” environment alongside the current “blue” one. Test green, then switch traffic from blue to green (for example, via router or load balancer configuration).
A slide titled "Advanced Strategies — Blue/Green" showing a diagram of blue and green application instances. Two blue boxes labeled app:v1 and two green boxes labeled app:v2 are shown with routing arrows indicating traffic switching.
  • A/B (traffic-splitting): Route a small percentage of real traffic to the new version and monitor metrics. Gradually increase traffic until the new version receives full load.
Table: comparison of common strategies
Automatic image-change triggers can start deployments as soon as a build finishes. If you need predictable rollout timing, consider disabling the automatic trigger and triggering deployments manually with oc rollout latest.

Common rollout commands

  • Trigger a manual rollout
  • View rollout history or status
  • Roll back to a prior revision
  • Inspect the DeploymentConfig resource
Example CLI summary:

Further reading

That’s it for this lesson — you now understand how OpenShift DeploymentConfigs manage application lifecycle, how image-based triggers and strategies affect rollouts, and the commands you’ll use to control deployments.

Watch Video