Trait kubeclient::clients::WriteClient [] [src]

pub trait WriteClient {
    type R;
    fn create(&self, resource: &Self::R) -> Result<Self::R>;
fn delete(&self, name: &str) -> Result<()>; }

Associated Types

Required Methods

Creates the named resource

This is similar to the kubectl create CLI commands.

Note: most of the resource type defintions are incomplete Pull requests to fill missing fields/types are appreciated (especially if documented).

Examples:

let kube = Kubernetes::load_conf("admin.conf")?;
let mut cfg_map = ConfigMap::new("stage-config")?;
cfg_map.insert("environment", "production");
// Note: using the `config_maps()` builder here is optional since resource type can be inferred
let response = kube.config_maps().create(&cfg_map)?;

Deleteds the named resource

This is similar to the kubectl delete CLI commands.

Examples

let kube = Kubernetes::load_conf("admin.conf")?;
kube.config_maps().delete("my-config-map")?;

Implementors