code: def _get_labels(node, apiserver_url):
      '''Get all labels from a kube node.'''
      # Prepare URL
      url = "{0}/api/v1/nodes/{1}".format(apiserver_url, node)
      # Make request
      ret = http.query(url)
      # Check requests status
      if 'body' in ret:
          ret = salt.utils.json.loads(ret.get('body'))
      elif ret.get('status', 0) == 404:
          return "Node {0} doesn't exist".format(node)
      else:
          return ret
      # Get and return labels
      return ret.get('metadata', {}).get('labels', {}f _get_labels(node, apiserver_url):
      '''Get all labels from a kube node.'''
      # Prepare URL
      url = "{0}/api/v1/nodes/{1}".format(apiserver_url, node)
      # Make request
      ret = http.query(url)
      # Check requests status
      if 'body' in ret:
          ret = salt.utils.json.loads(ret.get('body'))
      elif ret.get('status', 0) == 404:
          return "Node {0} doesn't exist".format(node)
      else:
          return ret
      # Get and return labels
      return ret.get('metadata', {}).get('labels', {})
docs: Get all labels from a kube node.