Radhe9254
Radhe9254

Reputation: 198

Kubernetes pods metrices through kubernetes-client library

I want to fetch the kubernetes CPU utilization and memory usage data points for last 7 days using kubernetes-client library for node js.

I'm using godaddy's kubernetes client library.

https://github.com/godaddy/kubernetes-client

Which function should I call to get pods metrices details?

Upvotes: 1

Views: 173

Answers (1)

Yaron Idan
Yaron Idan

Reputation: 6765

You shouldn't try to query stuff like CPU utilization and memory usage from the kubeernetes API.
Instead, you should query cAdvisor for that. They have a go client you can use to query the metrics directly, but it's more conventional to install prometheus on your cluster and query metrics from there.

Upvotes: 3

Related Questions