https://rancher.com/ logo
#general
Title
# general
a

adamant-kite-43734

12/27/2022, 8:56 AM
This message was deleted.
c

creamy-pencil-82913

12/27/2022, 8:14 PM
there are no containers for those things because they don’t run in containers. They all just run in the main k3s process.
If you scrape the metrics port, you’ll get metrics for all of them. Just don’t scrape them as individual.
v

victorious-airline-43065

12/27/2022, 8:43 PM
Thanks for a quick response. Issue is that prom stack is quite complex and it creates services in Kubernetes which map to containers for normal Kube distribution. Then in turn they configure Prometheus to pull from those services, and Grafana to pull from the Prometheus using labels in those containers for Prometheus QL. In short to do what you describe I would have to change quite some stuff in the prom stack. That's why I am asking if anyone have already done it as both K3s and prom stack are quite widespread.
c

creamy-pencil-82913

12/27/2022, 8:50 PM
just comment out all but one of the control-plane scrapers
v

victorious-airline-43065

12/27/2022, 8:54 PM
I also checked this thread where you actually answered some stuff: https://github.com/k3s-io/k3s/issues/3619 however even if I set the k3s config as is there I still don't understand how hardcoding the IPs in the endpoints for each service makes sense. If these run in main k3s process should I just get current Node IP and put it there (considering I bind them to 0.0.0.0)? What if there are multiple nodes? When you say "if you scrape the metrics port" do you mean I can basically scrape any of those services regardless and they will return me metrics for all of them (as opposed in k8s where they are all separated)? In that case I guess I will have to change Grafana dashboards as they use labels to run queries which are separated per service.
(sorry I just was writing this message and sent it when I saw you also sent me a message just now above)
So to sum it up, basically for these 3 (kube controller, proxy and etcd) in kube stack I need to disable 2 of them completely and enable only one and set it's endpoint to Node IP address (for example if I chose proxy Node IP: 10249) and then update Grafana dashboards so they all query data from Prometheus scraped data for that service (proxy).
(only thing I don't understand is if I have multiple nodes and want to have only one set of data for all of them how would that look like)
321 Views