15 breaking releases

0.16.0 May 8, 2024
0.15.0 Jan 23, 2024
0.14.0 Sep 16, 2023
0.12.0 Apr 9, 2023
0.6.0 Oct 30, 2022

#14 in #resource

Download history 31/week @ 2024-02-12 100/week @ 2024-02-19 66/week @ 2024-02-26 81/week @ 2024-03-04 6/week @ 2024-03-11 47/week @ 2024-03-18 40/week @ 2024-03-25 99/week @ 2024-04-01 16/week @ 2024-04-15 31/week @ 2024-04-29 190/week @ 2024-05-06 27/week @ 2024-05-13 14/week @ 2024-05-20 7/week @ 2024-05-27

238 downloads per month

Apache-2.0

20KB
435 lines

Kubernetes Metrics API Resource definitions

Portions of the code are copied from other projects, like kdash

Usage example

use k8s_metrics::v1beta1 as metricsv1;
use kube::api;

async fn pod_metrics(client: &kube::Client, namespace: &str) -> kube::Result<Vec<metricsv1::PodMetrics>> {
    let lp = api::ListParams::default();
    api::Api::<metricsv1::PodMetrics>::namespaced(client.clone(), namespace)
        .list(&lp)
        .await
        .map(|list| list.items)
}

Dependencies

~45MB
~717K SLoC