Best approach for creating dynamic config-files

10/23/2017

I would like to dynamically create config files for application, that should contain IP-address of the POD.

AFAIK it can be done using initcontainers, but what about deployments or rc?

-- user2079197
kubernetes

1 Answer

10/23/2017

Downward API is what you are looking for : https://kubernetes.io/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/

You can use this information to populate volumes or environment variables. You can define them on your deployment and they will get populated when pod is instantiated.

-- Radek 'Goblin' Pieczonka
Source: StackOverflow