astronomer.providers.cncf.kubernetes.hooks.kubernetes
¶
Module Contents¶
Classes¶
Creates Kubernetes API connection. |
- class astronomer.providers.cncf.kubernetes.hooks.kubernetes.KubernetesHookAsync(conn_id=default_conn_name, client_configuration=None, cluster_context=None, config_file=None, in_cluster=None, disable_verify_ssl=None, disable_tcp_keepalive=None)[source]¶
Bases:
airflow.providers.cncf.kubernetes.hooks.kubernetes.KubernetesHook
Creates Kubernetes API connection.
use in cluster configuration by using extra field
in_cluster
in connectionuse custom config by providing path to the file using extra field
kube_config_path
in connection- use custom configuration by providing content of kubeconfig file via
extra field
kube_config
in connection
use default config by providing no extras
This hook check for configuration option in the above order. Once an option is present it will use this configuration.
See also
For more information about Kubernetes connection: /connections/kubernetes
- Parameters:
conn_id (str | None) – The kubernetes connection to Kubernetes cluster.
client_configuration (client.Configuration | None) – Optional dictionary of client configuration params. Passed on to kubernetes client.
cluster_context (str | None) – Optionally specify a context to use (e.g. if you have multiple in your kubeconfig.
config_file (str | None) – Path to kubeconfig file.
in_cluster (bool | None) – Set to
True
if running from within a kubernetes cluster.disable_verify_ssl (bool | None) – Set to
True
if SSL verification should be disabled.disable_tcp_keepalive (bool | None) – Set to
True
if you want to disable keepalive logic.