Yep, so it looks like the existing jobs point to a single IP for the Kubernetes API, but the situation is different here since multiple IPs are needed.
It looks like you'll need to expand on the register_prometheus_jobs handler[1] in one of two ways. Either:
1) Collect IPs for all kubernetes-master units, and include them when rendering templates for services like kube-scheduler, or
2) Create a new handler, without the leadership.is_leader flag, so each kubernetes-master unit can create scrabe jobs for itself.
That's about all the guidance I can offer at the moment.
Yep, so it looks like the existing jobs point to a single IP for the Kubernetes API, but the situation is different here since multiple IPs are needed.
It looks like you'll need to expand on the register_ prometheus_ jobs handler[1] in one of two ways. Either:
1) Collect IPs for all kubernetes-master units, and include them when rendering templates for services like kube-scheduler, or
2) Create a new handler, without the leadership. is_leader flag, so each kubernetes-master unit can create scrabe jobs for itself.
That's about all the guidance I can offer at the moment.
[1]: https:/ /github. com/charmed- kubernetes/ charm-kubernete s-master/ blob/bb3328c490 f2e05b20010f688 be55296623fb7e1 /reactive/ kubernetes_ master. py#L3177