I am looking on how can I change the parameter of containers depending on the number of replica ?
For example, I would like to have an environment variable ( which is the name of my hubot) as follow :
Do you have an idea of how can I achieve that ? Thanks !
The feature is called "StatefulSets" in Kubernetes. Have a look at the Stable Network ID section in particular.
Stateful sets are available in Kubernetes 1.5. If you need an older version, you could use some kind of central registry like redis instead and implement some logic where new pods request the next free number when they start.