Replica Set
Replica Set also known as Replication Controller previously, allows us to have multiple instances of the same pod on the Worker Node, the replica set allows to set the state of the application on the cluster and the replication controller tries to ensure the state across the cluster, for example when the pod goes down, it tries to create a new one to ensure the state, it also acts a internal Load Balancer balancing the traffic across the pods and also creates new pods on different nodes to handle the traffic thus ensuring scaling of the application as required
The one major difference between Replication Controller and Replica Set is that the later can control pods that were not created by replication controller, this helps us achieve better control on our pods and applications, this is done using Labels & Selectors in the selectors section of the YAML file.
we can use the kubectl scale --replicas=x -f filename.yaml or kubectl replace -f filename.yaml or using the `kubectl scale —replicas=6 replicaset
Replica Set
Link to original