airflow.providers.cncf.kubernetes.kube_client

Client for kubernetes communication.

Module Contents

Functions

get_kube_client([in_cluster, cluster_context, config_file])

Retrieve Kubernetes client.

Attributes

log

has_kubernetes

airflow.providers.cncf.kubernetes.kube_client.log[source]
airflow.providers.cncf.kubernetes.kube_client.has_kubernetes = True[source]
airflow.providers.cncf.kubernetes.kube_client.get_kube_client(in_cluster=None, cluster_context=None, config_file=None)[source]

Retrieve Kubernetes client.

Parameters
  • in_cluster (bool | None) – whether we are in cluster

  • cluster_context (str | None) – context of the cluster

  • config_file (str | None) – configuration file

Returns

kubernetes client

Return type

kubernetes.client.CoreV1Api

Was this entry helpful?