'Retrieve host name and IP address from the payload returned by the listing
pods endpoints from kubelet.
The host IP address is different from the default router for the pod.'

def _fetch_host_data(self):

    try:
        pod_items = (self.retrieve_pods_list().get('items') or [])
    except Exception as e:
        log.warning('Unable    to    retrieve    pod    list    %s.    Not    fetching    host    data', str(e))
        return
    for pod in pod_items:
        metadata = pod.get('metadata', {})
        name = metadata.get('name')
        if (name == self.host_name):
            status = pod.get('status', {})
            spec = pod.get('spec', {})
            self._node_ip = status.get('hostIP', '')
            self._node_name = spec.get('nodeName', '')
            break
