How to configure an Ingress to access all pods from a DaemonSet?

196 Views Asked by At

I'm using hardware-dependents pods; in my K8s, I instantiate my pods with a DaemonSet.

Now I want to access those pods with an URL like https://domain/{pod-hostname}/

My use case is a bit more tedious than this one. my pods' names are not predefined.

Moreover, I also need a REST entry point to list my pod's name or hostname.

1

There are 1 best solutions below

0
Uriel On BEST ANSWER

I publish a Docker Image to solve my issue: urielch/dyn-ingress

My YAML configuration is in the Docker doc.

This Container add label on each pod, then use this label to create a service per pod, and then update an existing Ingress to reach each node with a path //

feel free to test it. the source code is here