Example manifests
Below are two example manifests: a standard Kubernetes Deployment and an OpenShift DeploymentConfig. Note the differentapiVersion and kind for the OpenShift-specific object.
What does a Deployment do?
- A Deployment is a Kubernetes controller that ensures a desired number of Pods from a Pod template are running.
- You declare the replica count (for example
replicas: 3) and the Deployment controller uses a ReplicaSet to maintain that count. - The Deployment spec contains the Pod template where you define container images, ports, volumes, environment variables, and other container-level settings.
- When you update the Pod template (for example, change the container image), the Deployment controller creates a new ReplicaSet and performs a controlled rollout (rolling update by default).
kubectl apply -f deployment.yamlkubectl rollout status deployment/examplekubectl rollout history deployment/example
What does a DeploymentConfig do?
- A DeploymentConfig is conceptually similar: it stores a Pod template and the desired replica count, and its controller creates ReplicationController objects to realize that desired state.
- DeploymentConfig supports OpenShift-specific triggers that can start a new deployment automatically when something changes — for example:
imageChangetriggers hooked to ImageStreams.configChangetriggers when the DeploymentConfig template or strategy changes.
- DeploymentConfig supports several deployment strategies (Rolling, Recreate, Custom), and can be managed via the
ocCLI in OpenShift.
oc apply -f deploymentconfig.yamloc rollout status dc/exampleoc tag/oc import-image(for ImageStream workflows)

Key differences
- Controller types
- Kubernetes Deployment → creates ReplicaSets.
- OpenShift DeploymentConfig → creates ReplicationControllers.
- Selector capabilities
- ReplicaSet (used by Deployments) supports set-based selector requirements via
matchExpressionsas well asmatchLabels. - ReplicationController (used by DeploymentConfig) supports only equality-based selectors (label equality via
matchLabels).
- ReplicaSet (used by Deployments) supports set-based selector requirements via
- Update/triggers and strategies
- Deployments perform rollouts (rolling update by default) when the Pod template changes. Kubernetes provides rollout commands (
kubectl rollout) and declarative updates (kubectl apply) to manage this. - DeploymentConfig supports additional OpenShift triggers (notably
imageChangetriggers tied to ImageStreams andconfigChange) that can automatically trigger a new deployment when an ImageStream or config changes. DeploymentConfig also supports multiple deployment strategies (Rolling, Recreate, Custom).
- Deployments perform rollouts (rolling update by default) when the Pod template changes. Kubernetes provides rollout commands (
Quick comparison table
Both controllers ensure the declared replica count. If you declare
replicas: 3 and two Pods fail, the ReplicaSet or ReplicationController will start new Pods to reach the declared count.
Use a standard Kubernetes Deployment unless you need OpenShift-only features such as
imageChange triggers tied to ImageStreams or tighter integration with OpenShift Builds and the oc workflow.Recommendation
- Choose Kubernetes Deployments for portability and compatibility with upstream Kubernetes tooling and CI/CD pipelines.
- Choose DeploymentConfig when you require OpenShift-native capabilities: ImageStream-driven workflows, automatic image triggers, or an existing OpenShift Build/Deploy pipeline.
Summary
- Deployments and DeploymentConfigs both manage Pod templates and scaling.
- They differ in the underlying controller (ReplicaSet vs ReplicationController), selector semantics, and integration with OpenShift features.
- For most use cases, prefer Kubernetes Deployments for portability; use DeploymentConfig when you specifically require OpenShift features.
Links and references
- Kubernetes Deployments documentation
- OpenShift DeploymentConfig documentation
- OpenShift ImageStreams