astronomer.providers.cncf.kubernetes.hooks.kubernetes¶
Module Contents¶
Classes¶
Creates Kubernetes API connection. |
Functions¶
|
Get field from extra, first checking short name, then for backward compatibility we check for prefixed name. |
- astronomer.providers.cncf.kubernetes.hooks.kubernetes.get_field(extras, field_name, strict=False)[source]¶
Get field from extra, first checking short name, then for backward compatibility we check for prefixed name.
- 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.KubernetesHookCreates Kubernetes API connection.
use in cluster configuration by using extra field
in_clusterin connectionuse custom config by providing path to the file using extra field
kube_config_pathin connection- use custom configuration by providing content of kubeconfig file via
extra field
kube_configin 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 (kubernetes.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
Trueif running from within a kubernetes cluster.disable_verify_ssl (bool | None) – Set to
Trueif SSL verification should be disabled.disable_tcp_keepalive (bool | None) – Set to
Trueif you want to disable keepalive logic.