Are the master and worker nodes the same node in case of a single node cluster?

9/19/2020

I started a minikube cluster (single node cluster) on my local machine with the command:

minikube start --driver=virtualbox

Now, when I execute the command:

kubectl get nodes

it returns:

 NAME       STATUS   ROLES    AGE     VERSION 
minikube    Ready   master   2m59s    v1.19.0

My question is: since the cluster has only one node and according to the previous command it is a master node, what is the worker node? Are the master and worker nodes the same node in case of a single node cluster?

-- alex_the_great
cluster-computing
kubernetes
minikube

2 Answers

9/19/2020

The answer to your question is yes in your case your master node is itself a worker node.

Cluster The group of vm or physical computers.

Master is the where control plane component installed such as etcd,controller-manager,api-server which are necessary to control the whole cluster state. In best practices and big production cluster never ever use master node to schedule application related workload.

Worker node is the simple plane VM where docker and kubernetes packages installed but not installed the control-plane component etc. Normally worker node is used to handle your application related workload.

And if you have only one machine where you configure kubernetes then it becomes single node kubernetes. and it act as a master/worker.

I hope this helps you to unsderstand

-- Dashrath Mundkar
Source: StackOverflow

9/19/2020

since the cluster has only one node and according to the previous command it is a master node, what is the worker node? Are the master and worker nodes the same node in case of a single node cluster?

Yes, using Minikube, you only use a single node. And your workload is scheduled to execute on the same node.

Typically, Taints and Tolerations is used on master nodes to prevent workload to be scheduled to those nodes.

-- Jonas
Source: StackOverflow