def _SetSshDetails(self):
    """
    SSH to containers is done through one of Kubernetes Nodes:
    - SSH IP address is the address of one of the Nodes,
    - SSH port is assigned to Kubernetes Service matched with this container.
    """

    get_service_cmd = [FLAGS.kubectl, '--kubeconfig=%s' % FLAGS.kubeconfig,
                       'get', 'service', self.name, '-o', 'json']
    stdout, _, _ = vm_util.IssueCommand(get_service_cmd, suppress_warning=True)
    service = json.loads(stdout)
    ports = service.get('spec', {}).get('ports', [])

    if not ports:
      raise Exception(self.name % "Port of service %s not found. Retrying.")
    self.ssh_port = ports[0]['nodePort']

    get_pod_cmd = [FLAGS.kubectl, '--kubeconfig=%s' % FLAGS.kubeconfig,
                   'get', 'pod', self.name, '-o', 'json']
    stdout, _, _ = vm_util.IssueCommand(get_pod_cmd, suppress_warning=True)
    pod = json.loads(stdout)
    pod_ip = pod.get('status', {}).get('podIP', None)

    if not pod_ip:
      raise Exception("Internal POD IP address not found. Retrying.")

    self.internal_ip = pod_ip
    self.ip_address = random.choice(FLAGS.kubernetes_nodes)
dataset/ETHPy150Open GoogleCloudPlatform/PerfKitBenchmarker/perfkitbenchmarker/providers/kubernetes/kubernetes_virtual_machine.py/KubernetesVirtualMachine._SetSshDetails/swapped operands of `%`