Crate qube

source ·
Expand description

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

Re-exports

pub use clients::Kubernetes;
pub use config::KubeConfig;
pub use errors::Error;

Modules

Types and helpers for kubeconfig parsing.