Get Host IP Address From Inside Container?

HarryMuscle

Contributor
Joined
Nov 15, 2021
Messages
161
Is there a way to get the host IP address from inside a container? I need to communicate with an application running directly on the host from inside one of the Kubernetes containers and I'd rather not have to hard code the IP address as a container variable. I'm hoping that the Kubernetes DNS setup stores the host IP somewhere and I just need to know the correct domain name to use to query it.

Thanks,
Harry
 
Top