k3s-io / k3s

Lightweight Kubernetes
https://k3s.io
Apache License 2.0
26.62k stars 2.24k forks source link

Expose k3s metrics over http #10059

Closed AkankshaHegde closed 2 weeks ago

AkankshaHegde commented 2 weeks ago

I want to get k3s metrics like pods and services, nodes and node health, then all the resources (e.g. secrets, pvcs, deployments, etc) and resource utilization and expose it over http which I can utilize later. Please do let me know how this can be acheived.

brandond commented 2 weeks ago

You can scrape those metrics from any of the normal Kubernetes metrics endpoints. Note that these are available over https, not http, and require authentication with a RBAC role that has access to /metrics, as in vanilla Kubernetes.

AkankshaHegde commented 2 weeks ago

May I know how this can be done. Can you please point me to some resources to do the same.