Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ynqa/kubernetes-rust
Rust client for Kubernetes
https://github.com/ynqa/kubernetes-rust
kubernetes kubernetes-client reqwest rust
Last synced: about 21 hours ago
JSON representation
Rust client for Kubernetes
- Host: GitHub
- URL: https://github.com/ynqa/kubernetes-rust
- Owner: ynqa
- License: apache-2.0
- Created: 2018-09-28T05:20:58.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-31T18:44:55.000Z (almost 2 years ago)
- Last Synced: 2025-01-02T04:08:39.002Z (8 days ago)
- Topics: kubernetes, kubernetes-client, reqwest, rust
- Language: Rust
- Homepage:
- Size: 723 KB
- Stars: 249
- Watchers: 12
- Forks: 23
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kubernetes-rust
[![Client Capabilities](https://img.shields.io/badge/Kubernetes%20client-Bronze-blue.svg?style=plastic&colorB=cd7f32&colorA=306CE8)](http://bit.ly/kubernetes-client-capabilities-badge)
[![Client Support Level](https://img.shields.io/badge/kubernetes%20client-beta-green.svg?style=plastic&colorA=306CE8)](http://bit.ly/kubernetes-client-support-badge)Rust client for [Kubernetes](http://kubernetes.io) API.
## Example
List all Pods on `kube-system`:
```rust
extern crate failure;
extern crate k8s_openapi;
extern crate kubernetes;use k8s_openapi::api::core::v1 as api;
use kubernetes::client::APIClient;
use kubernetes::config;fn main() {
let kubeconfig = config::load_kube_config().expect("failed to load kubeconfig");
let kubeclient = APIClient::new(kubeconfig);
let (req, _) = api::Pod::list_namespaced_pod("kube-system", Default::default())
.expect("failed to create a request");
let list_pod = kubeclient
.request::(req)
.expect("failed to list up pods");
println!("{:?}", list_pod);
}
```