Is it possible to determine the neighbour container or pod IP address, e.g. given its name? More specifically, if I have two running containers/pods C1 (ip=1.2.3.4) and C2 (ip=5.6.7.8) and I execute:
ME$ kubectl exec -it C1 bash
C1$ magic_command_to_get_ip C2
5.6.7.8
Is there a magic_command_to_get_ip?
I am new to Kubernetes and I used to resolve names to addresses in Docker using getent hosts tasks.$SERVICE
, but apparently it does not work with KB.