0

I am using AKS.the DNS policy is not set explicitly,which should be clusterFirst.today I had a strange log inside pod during its starting,showing localhost pointed to the IP of node instead of 127.0.0.1. who can tell me how does localhost work inside pod?

enter image description here

Andrew Skorkin
  • 1,147
  • 3
  • 11
focus zheng
  • 345
  • 1
  • 4
  • 12

1 Answers1

-1

Can you share the log and yaml file?

We can access Node IP with this:

containers:
- env:
  - name: NODE_IP
    valueFrom:
      fieldRef:
         fieldPath: status.hostIP
Hamid Ostadvali
  • 192
  • 1
  • 7
  • Hi Osta,I did not config environment variables in the pod.what I saw is the localhost:port was resolved to ip of node:port in the pod logs. – focus zheng Dec 10 '21 at 02:09