google-compute-enginekubernetesgoogle-kubernetes-engine

Replication Controller VS Deployment in Kubernetes


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 build applications using the web UI, they are set up 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?


Solution

  • 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.