14 breaking releases

0.15.0 Jan 23, 2024
0.14.0 Sep 16, 2023
0.13.0 Aug 17, 2023
0.12.0 Apr 9, 2023
0.6.0 Oct 30, 2022

#15 in #resource

Download history 29/week @ 2023-11-26 10/week @ 2023-12-10 22/week @ 2023-12-24 52/week @ 2023-12-31 33/week @ 2024-01-07 83/week @ 2024-01-14 74/week @ 2024-01-21 119/week @ 2024-01-28 67/week @ 2024-02-04 30/week @ 2024-02-11 100/week @ 2024-02-18 66/week @ 2024-02-25 80/week @ 2024-03-03 8/week @ 2024-03-10

254 downloads per month

Apache-2.0

18KB
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

~37MB
~595K SLoC