'Determine the pod name for the deployed service.'

def __get_pod_name(self, k8s_namespace, service):

    options = self.options
    response = check_run_quick('kubectl    {context}    get    pods    --namespace    {namespace}    |    gawk    -F    "[[:space:]]+"    "/{service}-v/    {{print    \\$1}}"    |    tail    -1'.format(context=('--context    {0}'.format(options.k8s_account_context) if options.k8s_account_context else ''), namespace=k8s_namespace, service=service))
    pod = response.stdout.strip()
    if (not pod):
        message = 'There    is    no    pod    for    "{service}"    in    {namespace}'.format(service=service, namespace=k8s_namespace)
        logging.error(message)
        raise ValueError(message)
    if (response.returncode != 0):
        message = 'Could    not    find    pod    for    "{service}".:    {error}'.format(service=service, error=response.stdout.strip())
        logging.error(message)
        raise ValueError(message)
    else:
        print '{0}    ->    "{1}"'.format(service, response.stdout)
    return response.stdout.strip()
