Skip to main content

ReplicaSets and Scaling

Updated Apr 07, 2022 ·

ReplicaSets

A ReplicaSet defines how many replicas (identical Pods) should run in the system at any time to ensure availability. It keeps the specified number of replicas stable.

We typically don’t create ReplicaSets directly. Instead, we create Deployments and specify the number of replicas there.

To check or modify a deployment:

kubectl edit deployment -n kube-system

To view running ReplicaSets:

kubectl get rs -n kube-system

For more information, please see ReplicaSets in Kubernetes.

Scaling

Scaling in Kubernetes is managed by the Replication Controller.

  • Ensures the specified number of replicas stay running

  • Replaces Pods if they fail, are deleted, or terminated

  • Useful even with one Pod to ensure it is always active