ReplicationControllers

ReplicationControllers deploy and maintain a defined number of Pods, all generated from a common template and a count of replicas. They're generally not created directly, instead created as part of a ReplicaSet or Deployment.

Updates

ReplicationControllers are designed to enable rolling configuration changes/updates to a service through replacement of Pods in series. The recommended approach is to create a new RC with one replica, then scale the new and old controllers by +1 and -1 respectively until 0 replicas exist in the old RC. Deployments combine this logic with readiness probes.

Definition

ReplicationControllers comprise:

  • A selector, which matches Pods.
  • A count of replicas defining the desired number of Pods.
  • A Pod template, used for creation of new Pods.

What to use instead

  • Use a ReplicaSet if you want something that behaves like a ReplicationController but supports the set-based selector syntax.
  • When deploying an application and want to use rolling updates use a Deployment: it manages the rolling update process server-side.

Backlinks