code: func getClusterNodesIP(kubeClient *unversioned.Client, nodeSelector string) (clusterNodes []string) {
  	listOpts := api.ListOptions{}
  
  	if nodeSelector != "" {
  		label, err := labels.Parse(nodeSelector)
  		if err != nil {
  			glog.Fatalf("'%v' is not a valid selector: %v", nodeSelector, err)
  		}
  		listOpts.LabelSelector = label
  	}
  
  	nodes, err := kubeClient.Nodes().List(listOpts)
  	if err != nil {
  		glog.Fatalf("Error getting running nodes: %v", err)
  	}
  
  	for _, nodo := range nodes.Items {
  		nodeIP, err := node.GetNodeHostIP(&nodo)
  		if err == nil {
  			clusterNodes = append(clusterNodes, nodeIP.String())
  		}
  	}
  	sort.Strings(clusterNodes)
  
  	return
  }
docs: // getClusterNodesIP returns the IP address of each node in the kubernetes cluster