Replicasets yaml defination file

Hi @mmumshad

When we define below specs in replicaset defination yaml file and we actually have 4 pods running with label app: myapp, will the replicaset delete one pod automatically?

specs:
selector:
matchLabels:
app: myapp
replicas: 3

Hello, @Aashiqahamed
Yes, ReplicaSet controller responsible to maintain the desire state. If it’s not matching with the desire state then it’s try to achieving that state. If 4 Pods already running with the same labels and replicas changed to 4 to 3. Then it will delete one pod.

Hi @player001 Thank you for clarification