4 releases (breaking)

Uses old Rust 2015

0.4.0 Oct 24, 2018
0.3.0 Oct 24, 2018
0.2.0 Oct 23, 2018
0.1.0 Oct 21, 2018

#440 in HTTP client


Used in korq

MIT license

70KB
1.5K SLoC

Kubernetes API client with async features (based on kubeclient)

An ergonomic Kubernetes API client to manage Kubernetes resources

Documentation

docs.rs/qube

Usage

You can find out about the basic usage in examples.

# Ensure you have a valid kubeconfig in admin.conf

## Get secret
cargo run --example get-secret secret123
[...]

## List nodes
cargo run --example list-nodes
[...]

Status

This client is still very incomplete, so expect to file issues and PRs to unblock yourself if you actually take this crate as a dependency.

It has basic support for many common operations, namely the ones I've personally needed, but I'm not yet using this library in production, so it's not very high priority for me. That said, I will commit to discussing issues and reviewing PRs in a timely manner.


lib.rs:

An ergonomic Kubernetes API client to manage kubernetes resources

Disclaimer: This crate is still super very incomplete in functionality. So expect to file issues and PRs to unblock yourself if you actually take this crate as a dependency.

Basic Usage

The prelude contains several the main Kubernetes type as well as several traits that expose the resource-specific methods for reading and writing kubernetes resources.

use kubeclient::prelude::*;

let kube = Kubernetes::load_conf("admin.conf")?;

if kube.healthy()? {
  if !kube.secrets().exists("my-secret")? {
    let output = kube.secrets().get("my-secret")?
    // ...
  }

  for node in kube.nodes().list()? {
    println!("Found node: {}", node.metadata.name.unwrap());
  }
}

Dependencies

~69MB
~1M SLoC