Tinyden
Tinyden

Reputation: 574

How does kubernetes guarantee the number of pods in replicaset

Suppose I have a deployment (with replicaset underlying) and set the replica count to 1, how does (or does) kubernetes guarantee there's at most one pod in the cluster?

One corner case is:

Upvotes: 1

Views: 55

Answers (1)

Mendi Neymark
Mendi Neymark

Reputation: 826

If you want to make sure that it will first delete the old pod and only then create a new one, you can set the strategy type to Recreate or consider switching to STS instead of Deployment

Upvotes: 0

Related Questions