class_docstr: A model server runner that launches model server in kubernetes cluster.
class_docstr_tok: ["A","model","server","runner","that","launches","model","server","in","kubernetes","cluster","."]
code: def GetLogs(self) -> Optional[str]:
      if (
          self._pod_name
          and self._namespace
          and self._executor_container
      ):
          result = self._k8s_core_api.read_namespaced_pod_log(
              name=self._pod_name,
              namespace=self._namespace,
              container=self._executor_container.name,
          )
          if isinstance(result, bytes):
              return result.decode("utf-8")
          elif isinstance(result, str):
              return result
          else:  # Generator of strs:
              return "\n".join(result)
      return None
  
imports: import datetime
  import os
  import time
  from typing import Optional
  from absl import logging
  from apache_beam.utils import retry
  from kubernetes import client
  from kubernetes.client import rest
  from tfx.components.infra_validator import error_types
  from tfx.components.infra_validator import serving_bins
  from tfx.components.infra_validator.model_server_runners import base_runner
  from tfx.proto import infra_validator_pb2
  from tfx.utils import kube_utils
label_desc: Use image node_id 6 for calling the KubernetesRunner obj's underlying member method code with example usage: obj.GetLogs() and returns: None, result, result, str