class_docstr: 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 <howto/connection:kubernetes>`
      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.
class_docstr_tok: ["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","<","howto\/connection",":","kubernetes",">","`","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","."]
docstr: Handle backcompat for extra fields.
  
  Prior to Airflow 2.3, in order to make use of UI customizations for extra fields,
  we needed to store them with the prefix ``extra__kubernetes__``. This method
  handles the backcompat, i.e. if the extra dict contains prefixed fields.
docstr_tok: ["Handle","backcompat","for","extra","fields",".","Prior","to","Airflow","2.3",",","in","order","to","make","use","of","UI","customizations","for","extra","fields",",","we","needed","to","store","them","with","the","prefix","``","extra__kubernetes__","``",".","This","method","handles","the","backcompat",",","i.e",".","if","the","extra","dict","contains","prefixed","fields","."]
code: def _get_field(self, field_name):
      """
      Handle backcompat for extra fields.
  
      Prior to Airflow 2.3, in order to make use of UI customizations for extra fields,
      we needed to store them with the prefix ``extra__kubernetes__``. This method
      handles the backcompat, i.e. if the extra dict contains prefixed fields.
      """
      if field_name.startswith("extra__"):
          raise ValueError(
              f"Got prefixed name {field_name}; please remove the 'extra__kubernetes__' prefix "
              f"when using this method."
          )
      if field_name in self.conn_extras:
          return self.conn_extras[field_name] or None
      prefixed_name = f"extra__kubernetes__{field_name}"
      return self.conn_extras.get(prefixed_name) or None
  
imports: from __future__ import annotations
  import contextlib
  import json
  import tempfile
  from functools import cached_property
  from typing import TYPE_CHECKING, Any, Generator
  import aiofiles
  from asgiref.sync import sync_to_async
  from kubernetes import client, config, watch
  from kubernetes.config import ConfigException
  from kubernetes_asyncio import client, config
  from urllib3.exceptions import HTTPError
  from airflow.exceptions import AirflowException, AirflowNotFoundException
  from airflow.hooks.base import BaseHook
  from airflow.models import Connection
  from airflow.providers.cncf.kubernetes.kube_client import _disable_verify_ssl, _enable_tcp_keepalive
  from airflow.providers.cncf.kubernetes.utils.pod_manager import PodOperatorHookProtocol
  from airflow.utils import yaml
label_desc: Use image node_id 7 for calling the KubernetesHook obj's underlying member method code with example usage: obj._get_field(field_name) and returns: unknown, unknown