Feature | DeploymentConfig (DC) | Deployment (K8s Deployment) |
---|---|---|
Belongs to | OpenShift-only (legacy) | Kubernetes-native (standard) |
API Group | apps.openshift.io/v1 | apps/v1 |
First Introduced | OpenShift 3.x | Kubernetes 1.x |
Purpose | Deploy/manage pods with extra OpenShift features like automatic image rebuilds. | Deploy/manage pods in a standard Kubernetes way. |
Triggers (auto-update) | Supports ImageChangeTrigger, ConfigChangeTrigger easily. | No built-in ImageTrigger (needs webhooks, GitOps, Tekton). |
Build Integration | Tight integration with OpenShift BuildConfig (S2I) + ImageStreams. | No native build integration β CI/CD pipelines needed separately. |
Rollback & Rollout | Managed by OpenShift internally (easy CLI commands). | Kubernetes-native rollback/rollout (kubectl rollout ). |
Strategy Options | Rolling, Recreate, Custom, and Hooks (pre/post hooks). | RollingUpdate, Recreate (no custom hooks by default). |
UI Support | Fully available in OpenShift 3.x/4.x console until 4.13. | Now the recommended method in OpenShift 4.14+. |
Lifecycle | π₯ Deprecated for feature development (4.14 onward). | π Active, recommended standard. |
Portability | β Works only on OpenShift. | β Works on any Kubernetes (EKS, AKS, GKE, OpenShift, etc.). |
π Example Differences
β 1. DeploymentConfig Example (Old way)
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
name: myapp
spec:
replicas: 2
selector:
app: myapp
triggers:
- type: ConfigChange
- type: ImageChange
template:
metadata:
labels:
app: myapp
spec:
containers:
- name: myapp
image: myapp:latest
- ImageChangeTrigger automatically pulls new images!
- Used with BuildConfigs and ImageStreams.
β 2. Deployment Example (Modern way)
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
spec:
replicas: 2
selector:
matchLabels:
app: myapp
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: myapp
spec:
containers:
- name: myapp
image: myapp:latest
- Pure Kubernetes Deployment.
- No automatic ImageStream trigger β you must manually update, use GitOps, webhook, or Tekton.
π₯ Key Functional Differences
Aspect | DeploymentConfig | Deployment |
---|---|---|
Auto image update from ImageStream | β
Built-in (ImageChangeTrigger ) | β Must build manually (e.g., webhook triggers) |
Build integration (BuildConfig) | β Tight coupling | β No coupling; CI/CD external |
OpenShift-only | β | β |
Kubernetes standard | β | β |
Future use (post-OpenShift 4.14) | β Legacy | β Standard |
π― In Short
If you are using… | Then… |
---|---|
OpenShift 3.x or old 4.x apps | You might still find/use DeploymentConfigs. |
OpenShift 4.14+ and new apps | β Use Kubernetes-native Deployments only. |
π Quick Real World Examples:
Use case | Best choice now |
---|---|
Building a new microservice app | Deployment |
Moving an app across clusters (OpenShift β EKS β AKS) | Deployment |
Legacy OpenShift S2I project with ImageStream auto-rebuilds | DeploymentConfig (until migrated) |
π’ Final Message:
- DeploymentConfig = OpenShift-specific, powerful in OpenShift pipelines, but deprecated for new feature development in 4.14+.
- Deployment = Kubernetes standard object, recommended for all new apps moving forward.
π Bonus Tip:
β
You can still use ImageStreams + Deployment together β
but instead of using “ImageChangeTriggers,”
you need to use external CI/CD pipelines (like Jenkins, Tekton, GitHub Actions) to update the Deployment automatically.
π― Quick One-Liner:
DeploymentConfig = OpenShift magic for older CI/CD,
Deployment = Kubernetes standard for modern apps.
Iβm a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Do you want to learn Quantum Computing?
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND