:py:mod:`astronomer.providers.cncf.kubernetes.hooks.kubernetes` =============================================================== .. py:module:: astronomer.providers.cncf.kubernetes.hooks.kubernetes Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: astronomer.providers.cncf.kubernetes.hooks.kubernetes.KubernetesHookAsync Functions ~~~~~~~~~ .. autoapisummary:: astronomer.providers.cncf.kubernetes.hooks.kubernetes.get_field .. py:function:: get_field(extras, field_name, strict = False) Get field from extra, first checking short name, then for backward compatibility we check for prefixed name. .. py:class:: 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) Bases: :py:obj:`airflow.providers.cncf.kubernetes.hooks.kubernetes.KubernetesHook` Creates Kubernetes API connection. - use in cluster configuration by using extra field ``in_cluster`` in connection - use 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. .. seealso:: For more information about Kubernetes connection: :doc:`/connections/kubernetes` :param conn_id: The :ref:`kubernetes connection ` to Kubernetes cluster. :param client_configuration: Optional dictionary of client configuration params. Passed on to kubernetes client. :param cluster_context: Optionally specify a context to use (e.g. if you have multiple in your kubeconfig. :param config_file: Path to kubeconfig file. :param in_cluster: Set to ``True`` if running from within a kubernetes cluster. :param disable_verify_ssl: Set to ``True`` if SSL verification should be disabled. :param disable_tcp_keepalive: Set to ``True`` if you want to disable keepalive logic. .. py:method:: get_api_client_async() :async: Create an API Client object to interact with Kubernetes