What is the difference between DeploymentConfig and Deployment in OpenShift, and when would you use each?

Prepare for the Red Hat Openshift Developer EX288 Exam. Study with comprehensive quizzes and flashcards. Each question includes hints and explanations to enhance your understanding. Ace your exam with confidence!

Multiple Choice

What is the difference between DeploymentConfig and Deployment in OpenShift, and when would you use each?

Explanation:
In OpenShift, DeploymentConfig is an OpenShift-specific deployment resource that integrates tightly with ImageStreams and image-change triggers. This lets a deployment automatically roll out when a new image appears in an ImageStream, which fits the OpenShift workflow where images are built and tagged into ImageStreams and deployments react to those changes. Deployment, on the other hand, is the standard Kubernetes-native Deployment. It defines how a pod template should be rolled out using the Kubernetes controllers, with rolling updates driven by changes to the PodSpec or by explicitly updating the image in the Deployment. In OpenShift 4, Deployments are the primary mechanism for new projects, aligning with Kubernetes conventions and tooling. DeploymentConfig remains for backward compatibility and for users who rely on OpenShift-specific features like image-change triggers and the traditional OpenShift deployment flow. So you’d use a Deployment when you want Kubernetes-native behavior, portability to plain Kubernetes, or you’re using tooling that expects standard Deployments. You’d use a DeploymentConfig if your workflow depends on OpenShift’s ImageStreams and image-change-based rollouts, or you’re maintaining existing DC-based configurations. The other options aren’t accurate because DeploymentConfig is not Kubernetes-native; they aren’t identical resources, and DeploymentConfig supports more than just blue-green deployments.

In OpenShift, DeploymentConfig is an OpenShift-specific deployment resource that integrates tightly with ImageStreams and image-change triggers. This lets a deployment automatically roll out when a new image appears in an ImageStream, which fits the OpenShift workflow where images are built and tagged into ImageStreams and deployments react to those changes.

Deployment, on the other hand, is the standard Kubernetes-native Deployment. It defines how a pod template should be rolled out using the Kubernetes controllers, with rolling updates driven by changes to the PodSpec or by explicitly updating the image in the Deployment.

In OpenShift 4, Deployments are the primary mechanism for new projects, aligning with Kubernetes conventions and tooling. DeploymentConfig remains for backward compatibility and for users who rely on OpenShift-specific features like image-change triggers and the traditional OpenShift deployment flow.

So you’d use a Deployment when you want Kubernetes-native behavior, portability to plain Kubernetes, or you’re using tooling that expects standard Deployments. You’d use a DeploymentConfig if your workflow depends on OpenShift’s ImageStreams and image-change-based rollouts, or you’re maintaining existing DC-based configurations.

The other options aren’t accurate because DeploymentConfig is not Kubernetes-native; they aren’t identical resources, and DeploymentConfig supports more than just blue-green deployments.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy