#kubernetes #kubectl #api-client

kubeclient

An ergonomic Kubernetes API client to manage Kubernetes resources

1 unstable release

Uses old Rust 2015

0.1.0 Oct 5, 2017

#478 in HTTP client


Used in cniguru

MIT license

58KB
1.5K SLoC

An ergonomic Kubernetes API client to manage Kubernetes resources

Crates.io

Documentation

docs.rs/kubeclient

Usage

Basic usage looks like this:

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);
  }
}

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.

Dependencies

~20–33MB
~580K SLoC