title: Kubernetes networking， How to transfer a variable to container
body: <p>I have a K8s, currently running in single node (master+kubelet,172.16.100.81). I have an config server image which I will run it in pod. The image is talking to another pod named eureka server. Both two images are spring boot application. And eureka server's http address and port is defined by me. I need to transfer eureka server's http address  and port to config pod so that it could talk to eureka server.</p>
  
  <p>I start eureka server: ( pesudo code)</p>
  
  <pre><code>kubectl run eureka-server --image=eureka-server-image --port=8761
  kubectl expose deployment eureka-server --type NodePort:31000
  </code></pre>
  
  <p>Then I use command "docker pull" to download config server image and run it as below:</p>
  
  <pre><code>kubectl run config-server --image=config-server-image --port=8888
  kubectl expose deployment config-server --type NodePort:31001
  </code></pre>
  
  <p>With these steps, I did not find the way to transfer eureka-server http
  server (master IP address 172.16.100.81:31000) to config server, are there 
  methods I could transer variable eureka-server=172.16.100.81:31000 to Pod config server? I know I shall use ingress in K8s networking, but currently I use NodePort. </p>