kubernetes_asyncio.config package

Submodules

Module contents

exception kubernetes_asyncio.config.ConfigException

Bases: Exception

kubernetes_asyncio.config.list_kube_config_contexts(config_file: str | None = None) tuple[list[Any], Any | None]
async kubernetes_asyncio.config.load_kube_config_from_dict(config_dict, context=None, client_configuration=None, temp_file_path=None) KubeConfigLoader

Loads authentication and cluster information from config_dict and stores them in kubernetes.client.configuration.

Parameters:
  • config_dict – Takes the config file as a dict.

  • context – set the active context. If is set to None, current_context from config file will be used.

  • client_configuration – The kubernetes_asyncio.client.Configuration to set configs to.

  • temp_file_path – directory where temp files are stored (default - system temp dir).

async kubernetes_asyncio.config.new_client_from_config(config_file=None, context=None, persist_config=True, temp_file_path=None) ApiClient

Loads configuration the same as load_kube_config but returns an ApiClient to be used with any API object. This will allow the caller to concurrently talk with multiple clusters.

async kubernetes_asyncio.config.new_client_from_config_dict(config_dict=None, context=None, temp_file_path=None) ApiClient

Loads configuration the same as load_kube_config_dict but returns an ApiClient to be used with any API object. This will allow the caller to concurrently talk with multiple clusters.