<p>I'm trying to run a docker container with nginx on a kubernetes cluster.  I'm using the environment variable service discovery for all my other containers, so I would like to keep it consistent and not have to bring something like skydns into the mix just because of this.  Is it possible to access environment variables in nginx such that I can tell it to proxy-pass to a kubernetes service?</p>

<p>How about this the shell script below which is run by a Docker container?</p>

<p><a href="https://github.com/GoogleCloudPlatform/kubernetes/blob/295bd3768d016a545d4a60cbb81a4983c2a26968/cluster/addons/fluentd-elasticsearch/kibana-image/run_kibana_nginx.sh" rel="nofollow">https://github.com/GoogleCloudPlatform/kubernetes/blob/295bd3768d016a545d4a60cbb81a4983c2a26968/cluster/addons/fluentd-elasticsearch/kibana-image/run_kibana_nginx.sh</a> ?</p>
