class_docstr: Launches runs onto kubernetes.
class_docstr_tok: ["Launches","runs","onto","kubernetes","."]
docstr: Create a Kubernetes runner.
  
  Arguments:
      api: The API client object.
      backend_config: The backend configuration.
      environment: The environment to launch runs into.
  
  Raises:
      LaunchError: If the Kubernetes configuration is invalid.
docstr_tok: ["Create","a","Kubernetes","runner",".","Arguments",":","api",":","The","API","client","object",".","backend_config",":","The","backend","configuration",".","environment",":","The","environment","to","launch","runs","into",".","Raises",":","LaunchError",":","If","the","Kubernetes","configuration","is","invalid","."]
code: def __init__(
      self,
      api: Api,
      backend_config: Dict[str, Any],
      environment: AbstractEnvironment,
      registry: AbstractRegistry,
  ) -> None:
      """Create a Kubernetes runner.
  
      Arguments:
          api: The API client object.
          backend_config: The backend configuration.
          environment: The environment to launch runs into.
  
      Raises:
          LaunchError: If the Kubernetes configuration is invalid.
      """
      super().__init__(api, backend_config)
      self.environment = environment
      self.registry = registry
  
imports: import asyncio
  import base64
  import json
  import logging
  from typing import Any, Dict, Iterator, List, Optional, Tuple, Union
  import yaml
  import wandb
  from wandb.apis.internal import Api
  from wandb.sdk.launch.agent.agent import LaunchAgent
  from wandb.sdk.launch.environment.abstract import AbstractEnvironment
  from wandb.sdk.launch.registry.abstract import AbstractRegistry
  from wandb.sdk.launch.registry.azure_container_registry import AzureContainerRegistry
  from wandb.sdk.launch.registry.local_registry import LocalRegistry
  from wandb.sdk.launch.runner.abstract import Status
  from wandb.sdk.launch.runner.kubernetes_monitor import WANDB_K8S_LABEL_AGENT, WANDB_K8S_LABEL_MONITOR, WANDB_K8S_RUN_ID, CustomResource, LaunchKubernetesMonitor
  from wandb.util import get_module
  from .._project_spec import EntryPoint, LaunchProject
  from ..builder.build import get_env_vars_dict
  from ..errors import LaunchError
  from ..utils import LOG_PREFIX, MAX_ENV_LENGTHS, PROJECT_SYNCHRONOUS, get_kube_context_and_api_client, make_name_dns_safe
  from .abstract import AbstractRun, AbstractRunner
  import kubernetes_asyncio
  from kubernetes_asyncio import client
  from kubernetes_asyncio.client.api.batch_v1_api import BatchV1Api
  from kubernetes_asyncio.client.api.core_v1_api import CoreV1Api
  from kubernetes_asyncio.client.api.custom_objects_api import CustomObjectsApi
  from kubernetes_asyncio.client.models.v1_secret import V1Secret
  from kubernetes_asyncio.client.rest import ApiException
label_desc: Use image node_id 1 to create a new KubernetesRunner object from inherited base classes: AbstractRunner with example: obj = KubernetesRunner(api, backend_config, environment, registry)