-
Notifications
You must be signed in to change notification settings - Fork 768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to access the Prometheus metrics of kube-scheduler and kube-control-manager in microk8s cluster #4608
Comments
In Prometheus To fetch metrics from any component, we need host address and port number I have
And the Prometheu scrape config mentioned below.
|
127.0.0.1:10257 is the right address from the networking pov of the host, but not from the prometheus pod. You should use the IP address of the node instead (which you can find with "microk8s kubectl get node -o wide". The port numbers look fine |
Hi @neoaggelos , thank you for responding Yes, I have hostNetwork: true in pod settings, so it should be able to access hostNetwork moreover, I have also tried on the node where my control plane running in both the cases, I am not able to access it Could you please provide any doc ref that shows we can access kube-scheduler and kube-control -manger metrics through Prometheus? Thank you |
Hi @neoaggelos as suggested,
Thank you |
Hi @developer1622, ah yes, you are right, my bad. Have a look at what we do for the You need to specify these arguments on the services (arguments files can be found in |
Thank you for responding in Slack and here @neoaggelos. |
Summary
I have a microk8s 2-node cluster(one is the control plane and another is worker node)
I can access Prometheus metrics following components
API Server
kube-proxy
dns
Not able to access Prometheus metrics of the following components
Kube-scheduler
Kube-contol-manager
What Should Happen Instead?
As per this official doc: https://microk8s.io/docs/services-and-ports they run on 10259 and 10257
expectation is that able to access the metrics of scheduler and controller using standard Prometheus scrape configuration , but I am not able to.
But is not working even though my service account has cluster-admin role , when I access above ports, I am getting 403, tried with certificates also, please find below
Same goes with the Kube-scheduler also
Reproduction Steps
I have attached in the comment section to reproduce.
Introspection Report
I am not allowed to copy cluster data
Can you suggest a fix?
I am not sure but it is good to have seperate metrics for each K8s component on their own dedicated port.
Are you interested in contributing with a fix?
No, I do not have skillset
Thank you.
The text was updated successfully, but these errors were encountered: