Hi I am trying to get 2 pods within the same nodes to communicate with each other via their hostnames. Following this guide, I have tried a few approaches and here are the results:
Pod A: 10.42.0.11
Pod B: 10.42.0.12
Pod A ping Pod B via default DNS name (10-42-0-12.default.pod.cluster.local) → Works
Pod A ping Pod A hostname and subdomain (eg, pod-a-hostname.subdomain.default.pod.cluster.local) → Works
Pod A ping Pod B hostname and subdomain (eg, pod-b-hostname.subdomain.default.pod.cluster.local) → Does not work
May I know how can I setup a DNS name that allows Pod A and B to communicate with each other without knowing each other’s IP.