2

I am preparing dev environment and want to create a single host to be master and worker node for kubernetes.

How can I achieve my goal?

moonkotte
  • 3,661
  • 2
  • 10
  • 25

3 Answers3

1

The master node is responsible for running several Kubernetes processes that are absolutely necessary to run and manage the cluster properly. [1]

The worker nodes are the part of the Kubernetes clusters which actually execute the containers and applications on them. [1]


Worker nodes are generally more powerful than master nodes because they have to run hundreds of clusters on them. However, master nodes hold more significance because they manage the distribution of workload and the state of the cluster. [1]


By removing taint you will be able to schedule pods on that node.

You should firstly check the present taint by running:

kubectl describe node <nodename> | grep Taints

In case the present one is master node you should remove that taint by running:

kubectl taint node <mastername> node-role.kubernetes.io/master:NoSchedule-

References: [1] - What is Kubernetes cluster? What are worker and master nodes?

See also:

kkopczak
  • 742
  • 2
  • 8
  • `Worker nodes are generally more powerful than master nodes because they have to run hundreds of clusters on them` - I guess `clusters` was meant to be `containers` or `pods` – rkosegi Dec 30 '21 at 14:20
0
  • The difference between master node and worker node is that "regular pods cannot be scheduled on a master node because of a taint"

  • You just need to remove node-role.kubernetes.io/master:NoSchedule taint so that pods can be scheduled on that (master) node.

Following is the command:

kubectl taint nodes <masternodename> node-role.kubernetes.io/master:NoSchedule- 
confused genius
  • 2,876
  • 2
  • 16
  • 29
0

You have to remove the NoSchedule taint from the MASTER node. I just spun up a kubeadm node and the taint is on my control-plane, not master. So I did the following (sydney is the node name):

    $kubectl describe node sydney | grep Taints

    Taints:             node-role.kubernetes.io/control-plane:NoSchedule
    
    $kubectl taint nodes sydney node-role.kubernetes.io/control-plane:NoSchedule-

    node/sydney untainted
    
    $kubectl describe node sydney | grep Taints
    Taints:             <none>
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 11 '22 at 18:52