A replica count declares how many instances of a workload should run. In a Kubernetes Deployment, it is the desired number of Pods; if omitted, the count defaults to 1. section 8.3.3
Kubernetes treats the count as desired state. Deployments and StatefulSets provision replacement Pods when instances are deleted, fail, or otherwise stop running, keeping the declared total available. section 8.6
Scaling an NGINX Deployment
Set spec.replicas to 15 in a Deployment manifest, apply it with kubectl apply -f my-first-deployment.yaml, and inspect the result with kubectl get deployments or kubectl get pods --selector app=my-nginx. A Service automatically load balances traffic to available, ready Pods. section 8.3.3
Replica counts also appear in Docker Swarm Compose deploy directives, where each service can request a different number of instances. More instances require more cluster compute capacity; ordinary Compose ignores these deploy replicas. section 9.1.2
Replication does not make stateful instances a cluster automatically. StatefulSets pair each declared Pod replica with persistent storage and predictable ordering, but database clustering requires additional work. section 8.4.2

