How to pass args to pods based on Ordinal Index in StatefulSets?

后端 未结 5 1238
再見小時候
再見小時候 2021-01-04 19:43

Is it possible to pass different args to pods based on their ordinal index in StatefulSets? Didn\'t find the answer on the StatefulSets documentation. Thanks!

5条回答
  •  没有蜡笔的小新
    2021-01-04 20:19

    In case you want to track the progress of this, the ticket in question for this feature is here: https://github.com/kubernetes/kubernetes/issues/30427

    The proposal involves putting the ordinal as a label on the pod and then using the downward api to pull that out into an environment variable or something.

提交回复
热议问题