kubectl_util.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:benchmarks 作者: tensorflow 项目源码 文件源码
def CreatePods(pod_name, yaml_file):
  """Creates pods based on the given kubernetes config.

  Args:
    pod_name: 'name-prefix' selector for the pods.
    yaml_file: kubernetes yaml config.

  Raises:
    TimeoutError: if jobs didn't come up for a long time.
  """
  command = [_KUBECTL, 'create', '--filename=%s' % yaml_file]
  logging.info('Creating pods: %s', subprocess.list2cmdline(command))
  subprocess.check_call(command)

  if not _WaitUntil(100, _GetPodNames, pod_name):
    raise TimeoutError(
        'Timed out waiting for %s pod to come up.' % pod_name)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号