Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between kubernetes labels node-role.kubernetes.io/master and node-role.kubernetes.io/control-plane?

Tags:

kubernetes

I am newbie to kubernetes, I see one of my node's role is control-plane,master. What is the difference? is a master node is a node running kube-apiserver? Then what defined control-plane node?

I am using kubectl 1.20.2(kubeadm also 1.20.2).

like image 736
ZhaoGang Avatar asked Mar 02 '23 17:03

ZhaoGang


1 Answers

The old node-role.kubernetes.io/master label and taint key has been deprecated and will be replaced with node-role.kubernetes.io/control-plane instead, they are both valid during a transition period. Adding them both ensures backward compatibility while also supporting tools using the newer terminology.

The reason for the name change is that The Kubernetes project is moving away from wording that is considered offensive. A new working group WG Naming has been created to track this work, and the word master was declared as offensive and the Recommendation: master -> control plane has been accepted:

Within the Kubernetes codebase, the term “master” is often used in reference to the kubernetes control plane, either as a whole or to some subset of the components within. We recommend control plane to refer to the set of components as a whole. We recommend context-specific alternatives when talking about individual components or the roles they serve.

As part of the Kubernetes eco-system, kubeadm complies with this recommendation, more information in KEP-2067: Rename the kubeadm "master" label and taint:

Kubeadm applies a "node-role" label to its control plane Nodes. Currently this label key is node-role.kubernetes.io/master and it should be renamed to node-role.kubernetes.io/control-plane. Kubeadm also uses the same "node-role" as key for a taint it applies on control plane Nodes. This taint key should also be renamed to "node-role.kubernetes.io/control-plane".

This is also mentioned in the Kubernetes v1.20.0 Release notes

like image 111
danielorn Avatar answered May 12 '23 04:05

danielorn