Setting environment variable in kubernetes stateful set

30 Views Asked by At

I have configmap with data myapp-0:VALUE_A and myapp-1:VALUE_B. In a statefull set with 2 pods myapp-0 and myapp-1 I need to set environment myapp-0=VALUE_A for pod "myapp-0" and myapp-1=VALUE_B for pod myapp-1

I am not able fetch the key dynamically from configmap using $(POD_ORDINAL)

0

There are 0 best solutions below