Sobes.tech
Senior

What are Pod, Deployment, and Deployment Config in Kubernetes/OpenShift? What is the difference?

sobes.tech AI

Answer from AI

In Kubernetes and OpenShift:

  • Pod — the smallest deployable unit that contains one or more containers running on the same host and sharing network and storage. A Pod is a "shell" for containers.

  • Deployment — a controller that manages the creation and updating of Pods. It provides declarative management of application state: how many replicas should be running, updates without downtime, rollback, etc. Deployment ensures that the desired number of Pods are always running.

  • DeploymentConfig — similar to Deployment but specific to OpenShift. It extends Deployment capabilities by adding additional triggers (e.g., on container image change), more flexible update strategies, and integration with OpenShift pipelines.

Main differences:

  • Pod — directly involves containers.
  • Deployment — a standard Kubernetes resource for managing the lifecycle of Pods.
  • DeploymentConfig — an OpenShift extension with additional features not available in standard Deployment.

Example: you create a Deployment that guarantees always having 3 Pods running your application. When you update the image, Deployment smoothly updates the Pods without downtime.