Home > OS >  Kubernetes deployment to create a ReplicaSet with custom name
Kubernetes deployment to create a ReplicaSet with custom name

Time:09-18

Is it possible to "ask" Kubernetes Deployment to create ReplicaSet with custom name?
E.g. I want it to be nginx-replicaset1 instead of nginx-8576854954

CodePudding user response:

There's no way to control the name of the ReplicaSets a Deployment creates. Of note, each time you modify the Deployment, it will create a new ReplicaSet, and the Deployment controller will need to choose a new unique name, and it's very possible to have 3 or more ReplicaSets for a single Deployment.

In a comment you mention a "limitation of 15 symbols". The normal suffixes added by a Deployment to create its ReplicaSets, and then by a ReplicaSet to create its Pods, usually add up to about a dozen characters on their own, so limiting names to 15 characters isn't reasonable for Kubernetes. (There is a more general limit of 63 characters for a name, which comes from DNS's rules, but that's a much more manageable limit.)

  • Related