How to read pod information in dockerfile

8/7/2019

I have a requirement where I have to read information about pods such as podname, attachedvolume name etc and pass it onto the DockerFile which will write this information inside the container configuration files. This docker image is part of the same pod spec which will get downloaded.

-- jimy page
docker
kubernetes

1 Answer

8/7/2019

If you need to pass information about pod into a configuration file you can use environment variables or Downward API.

-- FL3SH
Source: StackOverflow