def run_job(self, yaml_spec, timeout=600):
    ' run_job runs a kubernetes job and clean up afterwards '
    (pod_name, succ) = self._create_k8s_job(yaml_spec)
    if (not succ):
        return False
    succ = self._wait_for_k8s_job(pod_name, yaml_spec, timeout)
    if (not succ):
        logging.info('Kubernetes job failed.')
        return False
    self._delete_k8s_job(pod_name, yaml_spec)
    return succ
run_job runs a kubernetes job and clean up afterwards
def run_job(self, yaml_spec, timeout=600):
    '  '
    (pod_name, succ) = self._create_k8s_job(yaml_spec)
    if (not succ):
        return False
    succ = self._wait_for_k8s_job(pod_name, yaml_spec, timeout)
    if (not succ):
        logging.info('Kubernetes job failed.')
        return False
    self._delete_k8s_job(pod_name, yaml_spec)
    return succ