Skip to main content

ReplicaControllers & ReplicaSets

  • "Monitor pods and if any of them fail, deploy new ones."
  • "ReplicaSets ensure that the desired number of Pods always run (even if one is deleted)."

Interacting​

Getting current status...

kubectl get replicasets.apps

Get details on image (and more) used to create the pods...

kubectl describe replicasets.apps new-replica-set

Creating​

kubectl apply -f replicaset-definition-1.yaml

Editing​

kubectl edit replicaset.apps new-replica-set

Scaling​

kubectl scale replicaset --replicas=5 new-replica-set

Labels & Selectors​

  • Labeling pods enables us to know "know which pods to monitor"