I’m running a service (in Rancher v1.6.29) that exposes host’s metrics to Prometheus. For that, I run a container in each host.
What I want to do is expose those through the Rancher LB. The thing is - a Service rule can target a service, and not a container.
So I was wondering that I should be able to create a Selector Rule for each of the hosts targeting their container. I’d probably need to individually label the hosts, and then use that label + some service label to target for the container I want.
But I’m not being able to get it working.
Is this feasible? Is this a good use case of Selector Rules?
Are there examples/tutorials on how to use them? I know I’ve tried it, but it didn’t work. I don’t know much about Selector Rules, so I’m not even that sure on where to start troubleshooting.
Any help will be much appreciated.