Re: [kubernetes-users] Clean up old, empty replica sets created by a deployment

1,881 views
Skip to first unread message

Rodrigo Campos

unread,
Nov 23, 2016, 8:26:15 PM11/23/16
to kubernet...@googlegroups.com
If you don't rollback, I don't think the deployment will miss them. I don't think it will cause any problems.

You can configure how many to keep here, the default is big or all: http://kubernetes.io/docs/user-guide/deployments/#revision-history-limit

On Wednesday, November 23, 2016, Nate Rook <na...@askspoke.com> wrote:
Deployments are great! However, they have the downside of creating a lot of obsolete replica sets. This is what I wind up with now:

$ kubectl get rs
deployment-name-920127227       0         0         0         33d
deployment-name-946622287       0         0         0         5d
deployment-name-949954325       0         0         0         40d
deployment-name-950161082       0         0         0         7d
deployment-name-991561338       0         0         0         35d
<repeat hundreds of times>

Is there a right way to get rid of these replica sets? I assume they're being kept around so if I ever decide to roll back to the deployment version from two months ago, it can happen. 

(Obviously, I could just delete the replica sets, but I feel like that might be a bad idea if the deployment expects them to stick around.)

--
You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

Nate Rook

unread,
Nov 28, 2016, 2:14:01 PM11/28/16
to Kubernetes user discussion and Q&A
Ah, that's perfect. Thank you!
Reply all
Reply to author
Forward
0 new messages