How to use the master node as worker node in Kubernetes cluster?

6/17/2019

I want to use the resources of master node of kubernetes cluster for my application which will be launched.

How to use the master node as worker node in Kubernetes cluster?

I have two nodes setup. I can launch a job from master node which is running on worker node. But I dont want to waste my Master node resources.

-- Asis Patra
kubernetes

2 Answers

6/17/2019

As this link

First, get the name of the master

kubectl get nodes

NAME     STATUS   ROLES    AGE   VERSION
yasin   Ready    master   11d   v1.13.4

as we can see there is one node with the name of yasin and the role is master. If we want to use it as worker we should run

kubectl taint nodes yasin node-role.kubernetes.io/master-
-- yasin lachini
Source: StackOverflow

6/17/2019

From here

By default, your cluster will not schedule pods on the master for security reasons. If you want to be able to schedule pods on the master, e.g. for a single-machine Kubernetes cluster for development, run:

kubectl taint nodes --all node-role.kubernetes.io/master-
-- Anshul Jindal
Source: StackOverflow