// Kubeadm adds the master role label, but not the node one. Add it ourselves so
// we can have a nicer kubectl get nodes output.
// $ kubectl get nodes
// NAME      STATUS    ROLES     AGE       VERSION
// kube-01   Ready     master    55s       v1.10.5
// kube-02   Ready     node      23s       v1.10.5
Kubeadm adds the master role label, but not the node one. Add it ourselves so
we can have a nicer kubectl get nodes output.
$ kubectl get nodes
NAME      STATUS    ROLES     AGE       VERSION
kube-01   Ready     master    55s       v1.10.5
kube-02   Ready     node      23s       v1.10.5
// Kubeadm adds the master role label but not the node one . Add it ourselves so // we can have a nicer kubectl get nodes output . // $ kubectl get nodes // NAME STATUS ROLES AGE VERSION // kube - 01 Ready master 55s v1 . 10 . 5 // kube - 02 Ready node 23s v1 . 10 . 5
func fixupNodeRoleLabel(m *clusterv1.Machine) {
	if IsNode(m) {
		m.Labels["node-role.kubernetes.io/node"] = ""
	}
}
func fixupNodeRoleLabel ( m * clusterv1 . Machine ) { if IsNode ( m ) { m . Labels [ " " ] = " " } }
Kubeadm adds the master role label, but not the node one.
Kubeadm adds the master role label but not the node one .