Noé
Noé

Reputation: 508

How to access web server running on host OS from inside a microk8s pod?

I would like to have a web server running in a pod reaching a web server running on my host OS.

To do that i need to have the ip or dns of my host inside microk8s.

Is there any way to get it?

Upvotes: 1

Views: 332

Answers (1)

Shashank V
Shashank V

Reputation: 11243

You can use Downward API to get host IP details.

Example:

env:
   - name: NODE_IP
     valueFrom:
       fieldRef:
         fieldPath: status.hostIP

Upvotes: 2

Related Questions