Skip to content

Instantly share code, notes, and snippets.

@rabellamy
Last active October 12, 2018 18:49
Show Gist options
  • Save rabellamy/d91efab63cf518013ee9b2efcbc850c3 to your computer and use it in GitHub Desktop.
Save rabellamy/d91efab63cf518013ee9b2efcbc850c3 to your computer and use it in GitHub Desktop.

ReplicationControllers

A ReplicationController is a Kubernetes resource that ensures its pods are always kept running. If the pod disappears for any reason, such as in the event of a node disappearing from the cluster or because the pod was evicted from the node, the ReplicationController notices the missing pod and creates a replacement pod.

When a node fails, only pods backed by a ReplicationController are recreated.

image

A ReplicationController’s reconciliation loop

image

A ReplicationController has three essential parts:

  • A label selector, which determines what pods are in the ReplicationController’s scope
  • A replica count, which specifies the desired number of pods that should be running
  • A pod template, which is used when creating new pod replicas
@rabellamy
Copy link
Author

rabellamy commented Oct 12, 2018

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment