Replication Controller VS Deployment in Kubernetes

byteSlayer picture byteSlayer · May 24, 2016 · Viewed 25.4k times · Source

I wanted to know what is the difference between a Replication Controller and a Deployment within Kubernetes (1.2). Going through the getting started document (http://kubernetes.io/docs/hellonode/) I have created a deployment - but it doesn't show up on the web UI.

When I create apps from the web UI - they are created as replication controllers. Functionally though, they seem very similar (they both manage pods and have services).

So - what is the difference and when should I use each?

Answer

Pixel Elephant picture Pixel Elephant · May 24, 2016

Deployments are a newer and higher level concept than Replication Controllers. They manage the deployment of Replica Sets (also a newer concept, but pretty much equivalent to Replication Controllers), and allow for easy updating of a Replica Set as well as the ability to roll back to a previous deployment.

Previously this would have to be done with kubectl rolling-update which was not declarative and did not provide the rollback features.

Kubernetes Dashboard has not yet been updated to support Deployments, and currently only supports Replication Controllers (see Deployments not visible in Kubernetes Dashboard).

EDIT: The dashboard now supports Deployments.