Metrics from kube-scheduler, kube-controller-manager and kube-proxy need to be exported to prometheus charm
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Kubernetes Control Plane Charm |
Triaged
|
High
|
Unassigned |
Bug Description
For now, In prometheus UI, I can't see scheduler_ prefixed metrics.
I've analyzed this a few and found out kubernetes-master doesn't register manual_job for kube-scheduler
so I added template manually like below
##
scrape_interval: 30s
metrics_path: /metrics
scheme: http
static_configs:
- targets:
- 10.0.0.9:10251 ( kubernetes-
##
then I can see scheduler_ prefixed metrics in prometheus UI.
It would be better if there is way to export kube-scheduler's metrics as well.
ADDED
In addition to kube-scheduler, kube-controller
For kube-proxy, kube-proxy snap need to be changed as it doesn't export it's metric for now.
--metrics-
ADDED for @cynerva's
Just adding template can't solve this issue as
e.g kube-state-metrics exposed by using service & endpoint with k8s deployment ( for kube-state-metrics)
So it can be access with metrics_path: /api/v1/
But for kube-scheduler, kube-controller
I tried to create service & endpoint for kube-scheduler, but it is local service inside k8s-master unit not deployment.
I think we need to change deployment structure to expose those.
Please give me some more advice or please engage canonical k8s team for this.
Thanks.
It should be possible to add this to the kubernetes-master charm's prometheus job templates[1].
[1]: https:/ /github. com/charmed- kubernetes/ charm-kubernete s-master/ tree/bb3328c490 f2e05b20010f688 be55296623fb7e1 /templates/ prometheus