A ReplicaSet is a Kubernetes object whose control loop maintains a specified number of equivalent pods. It is the layer between a Deployment and the pods running an application. section 1.4 section 1.4.1
For a stateless application, a Deployment creates or updates a ReplicaSet to maintain the desired pod count. A ReplicaSet represents a specific application version; changing a Deployment’s image creates a new ReplicaSet as the rollout moves between versions. section 5.1.2
To see the relationship in a cluster:
- Create a Deployment manifest with `kubectl create deploy nginx --image nginx --dry-run=client -o yaml > deploy.yaml`, then run `kubectl create -f deploy.yaml`. section 5.1.2
- Run `kubectl get deploy` and `kubectl get rs`. Compare the Deployment’s READY count with the ReplicaSet’s DESIRED, CURRENT, and READY columns. section 5.1.2
root@kind-control-plane:/# kubectl get rsNAME DESIRED CURRENT READY AGEapache-698b8cccbd5 5 5 28mapache-74f79bcc68 0 0 0 45m
This output shows one ReplicaSet with five desired, current, and ready pods alongside another with zero. Check all three counts rather than assuming every listed ReplicaSet is running pods. section 5.1.2




