code: def create_api_client(api='BatchV1'):
      
      k8s_config.load_incluster_config()
      api_configuration = client.Configuration()
      api_configuration.verify_ssl = False
      if api == 'extensions/v1beta1':
          api_client = client.ExtensionsV1beta1Api()
      elif api == 'CoreV1':
          api_client = client.CoreV1Api()
      elif api == 'StorageV1':
          api_client = client.StorageV1Api()
      else:
          api_client = client.BatchV1Api()
      return api_client
docs: Create Kubernetes API client using config.
  
      :param api: String which represents which Kubernetes API to spawn. By
          default BatchV1.
      :returns: Kubernetes python client object for a specific API i.e. BatchV1.