DELAPARRA
Index
Color
NL
Category: Kubernetes

ReplicaSet

Explained by Updated

What is ReplicaSet?

ReplicaSet: Keeps a fixed number of identical Pods running. Deployments create and manage ReplicaSets for you — you almost never touch one directly. A ReplicaSet in Kubernetes keeps a fixed number of identical pods running. If a pod dies, it creates a new one; if there are too many, it removes some.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about ReplicaSet

How is ReplicaSet used in practice?

You almost never create ReplicaSets yourself. A Deployment creates one for each version of your application and manages them during rollouts: the new ReplicaSet scales up while the old one scales down.

What should you keep in mind with ReplicaSet?

Old ReplicaSets are kept, scaled to zero, so kubectl rollout undo can switch back to a previous version quickly. revisionHistoryLimit on the Deployment controls how many are kept. When you see several ReplicaSets with names like web-7d9f8c in kubectl get rs, that is the Deployment's version history, not a problem to clean up.

What does an example of ReplicaSet look like?

kubectl get rs # web-7d9f8c 3 3 3 2m

At a glance

CategoryKubernetes
Explained by
Updated

More Kubernetes terms

All terms starting with R

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.