[][src]Function kube::config::incluster_config

pub fn incluster_config() -> Result<Configuration, Error>

Returns a config which is used by clients within pods on kubernetes. It will return an error if called from out of kubernetes cluster.

Example

use kube::config;

let kubeconfig = config::incluster_config()
    .expect("failed to load incluster config");