I recently dived into containers and kubernetes
I am trying to set an environment variable so that it will randomly or selectively choose from a list of words...
so say I have 1 pod which returns "hello world"
If I set a custom variable as RETURN_THIS = ["world", "kubernetes", "universe"]
if i scale to 3, then the second pod will return "hello kubernetes" and the third will return "hello, universe"
if I add another.. it would return "hello world"
and so forth
Any ideas on how I might be able to do this?
Use the $RANDOM
bash function
size=${#RETURN_THIS[@]}
HELLO=RETURN_THIS$(( $RANDOM % $size ))