Struct kube::config::Kubeconfig [−][src]
pub struct Kubeconfig {
pub preferences: Option<Preferences>,
pub clusters: Vec<NamedCluster, Global>,
pub auth_infos: Vec<NamedAuthInfo, Global>,
pub contexts: Vec<NamedContext, Global>,
pub current_context: Option<String>,
pub extensions: Option<Vec<NamedExtension, Global>>,
pub kind: Option<String>,
pub api_version: Option<String>,
}
config
only.Expand description
Kubeconfig
represents information on how to connect to a remote Kubernetes cluster
Stored in ~/.kube/config
by default, but can be distributed across multiple paths in passed through KUBECONFIG
.
An analogue of the config type from client-go.
This type (and its children) are exposed primarily for convenience.
Config
is the intended developer interface to help create a Client
,
and this will handle the difference between in-cluster deployment and local development.
Fields
preferences: Option<Preferences>
General information to be use for cli interactions
clusters: Vec<NamedCluster, Global>
Referencable names to cluster configs
auth_infos: Vec<NamedAuthInfo, Global>
Referencable names to user configs
contexts: Vec<NamedContext, Global>
Referencable names to context configs
current_context: Option<String>
The name of the context that you would like to use by default
extensions: Option<Vec<NamedExtension, Global>>
Additional information for extenders so that reads and writes don’t clobber unknown fields.
kind: Option<String>
api_version: Option<String>
Implementations
Some helpers on the raw Config object are exposed for people needing to parse it
Read a Config from an arbitrary location
Read a Config from KUBECONFIG
or the the default location.
Create Kubeconfig
from KUBECONFIG
environment variable.
Supports list of files to be merged.
Panics
Panics if KUBECONFIG
value contains the NUL character.
Trait Implementations
Returns the “default value” for a type. Read more
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Kubeconfig, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Kubeconfig, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Kubeconfig
impl Send for Kubeconfig
impl Sync for Kubeconfig
impl Unpin for Kubeconfig
impl UnwindSafe for Kubeconfig
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more