1

I did kubeadm init on one machine. I followed all the instructions on network etc and end up with this:

kubectl get nodes:

NAME              STATUS   ROLES           AGE    VERSION
slchvdvcybld001   Ready    control-plane   140m   v1.24.2
slchvdvcydtb001   Ready    <none>          136m   v1.24.2
slchvdvcytst001   Ready    <none>          137m   v1.24.2

As you can see, no nodes are Master or worker or similar.

I don't have some special setup, all I did is install it and did init.

There are no errors in logs file. Dashboard is in GREEN and everything is in green.

These are versions of kubectl and so on:

Client Version: v1.24.2
Kustomize Version: v4.5.4
Server Version: v1.24.2
pregmatch
  • 2,629
  • 6
  • 31
  • 68
  • Does this answer your question? [How to add roles to nodes in Kubernetes?](https://stackoverflow.com/questions/48854905/how-to-add-roles-to-nodes-in-kubernetes) – CodeWizard Jun 26 '22 at 14:11
  • 1
    this was question more about "why is iit node and why there is no master" and i got answer in Labelling of master node is deprecated. – pregmatch Jun 26 '22 at 14:51
  • 1
    The node which is marked with role “control-plane” itself is master node. – Nataraj Medayhal Jun 26 '22 at 17:13

2 Answers2

4

Labelling of master node is deprecated. That's where when using kubectl get nodes its showing role as "control-plane" instead of "control-plane,master"

More details are in following link Kubeadm: http://git.k8s.io/enhancements/keps/sig-cluster-lifecycle/kubeadm/2067-rename-master-label-taint/README.md

Nataraj Medayhal
  • 980
  • 1
  • 2
  • 12
2

Kubernetes's kube-scheduler doesn't require particular node labels to consider them as feasible. The only exception is the control plane label node-role.kubernetes.io/control-plane applied by kubeadm during the installation process.

In your case, just manually add the worker label with:

kubectl label nodes slchvdvcydtb001 node-role.kubernetes.io/worker=
explogx
  • 1,159
  • 13
  • 28