https://github.com/imp/k8s-metrics-rs
K8s Metrics (Rust bindings)
https://github.com/imp/k8s-metrics-rs
Last synced: 12 months ago
JSON representation
K8s Metrics (Rust bindings)
- Host: GitHub
- URL: https://github.com/imp/k8s-metrics-rs
- Owner: imp
- License: apache-2.0
- Created: 2022-10-09T11:09:21.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-06-05T09:31:51.000Z (about 1 year ago)
- Last Synced: 2025-06-05T09:58:00.532Z (about 1 year ago)
- Language: Rust
- Size: 92.8 KB
- Stars: 6
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Kubernetes Metrics API Resource definitions
Portions of the code are copied from other projects, like kdash
# Usage example
```rust
use k8s_metrics::v1beta1 as metricsv1;
use kube::api;
async fn pod_metrics(client: &kube::Client, namespace: &str) -> kube::Result> {
let lp = api::ListParams::default();
api::Api::::namespaced(client.clone(), namespace)
.list(&lp)
.await
.map(|list| list.items)
}
```