I created a ClusterIP service that has 3 pods in the deployment:
tornado-service ClusterIP 10.107.117.119 <none> 8085/TCP 2m
When I ssh into one of the pods it has these env variables:
TORNADO_SERVICE_PORT_8085_TCP_PROTO=tcp
TORNADO_SERVICE_PORT_8085_TCP=tcp://10.99.116.50:8085
TORNADO_SERVICE_SERVICE_HOST=10.99.116.50
Which doesn't match what kubectl
gave me. When I curl another pod using the ENV ip address it hangs:
curl -XPOST 10.99.116.50:8085
But when I use the kubectl
IP I get a 200 http response:
curl -XPOST 10.107.117.119:8085
Why is Kubernetes setting the service IP env incorrectly in my pods?