I have a list of 35 services that need to be continually monitored/exercised. I've got a container that can monitor any one of them and can check an environment variable to see which one of them it should monitor.
I'd like to tell Kubernetes to please deploy 35 pods of that container, each of them identical except for the environment variable. I could do this by creating 35 nearly identical manifest files and running kubectl create deployment
in a loop, but I suspect there's probably a better way. How do I best tell Kubernetes "please take this list of N strings and deploy one pod for each of them, each being assigned one of them?"
For example, if I've got a list like:
baseball
football
soccer
tennis
I'd like create a bunch of deployments that are identical, except for their name (preferably I'd include the name from the list as part of the name) and one environment variable telling the container which sport to monitor.