[][src]Struct kube::config::Kubeconfig

pub struct Kubeconfig {
    pub kind: Option<String>,
    pub api_version: Option<String>,
    pub preferences: Option<Preferences>,
    pub clusters: Vec<NamedCluster>,
    pub auth_infos: Vec<NamedAuthInfo>,
    pub contexts: Vec<NamedContext>,
    pub current_context: String,
    pub extensions: Option<Vec<NamedExtension>>,
}

Kubeconfig represents information on how to connect to a remote Kubernetes cluster that is normally stored in ~/.kube/config

This type (and its children) are exposed for convenience only. Please load a Config object for use with a Client which will read and parse the kubeconfig file

Fields

kind: Option<String>api_version: Option<String>preferences: Option<Preferences>clusters: Vec<NamedCluster>auth_infos: Vec<NamedAuthInfo>contexts: Vec<NamedContext>current_context: Stringextensions: Option<Vec<NamedExtension>>

Implementations

impl Kubeconfig[src]

Some helpers on the raw Config object are exposed for people needing to parse it

pub fn read_from<P: AsRef<Path>>(path: P) -> Result<Kubeconfig>[src]

Read a Config from an arbitrary location

pub fn read() -> Result<Kubeconfig>[src]

Read a Config from the default location

Trait Implementations

impl Clone for Kubeconfig[src]

impl Debug for Kubeconfig[src]

impl<'de> Deserialize<'de> for Kubeconfig[src]

impl Serialize for Kubeconfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.