Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Will (can) Kubernetes run Docker containers on the master node(s)?

Tags:

Kubernetes has master and minion nodes.

Will (can) Kubernetes run specified Docker containers on the master node(s)?

I guess another way of saying it is: can a master also be a minion?

Thanks for any assistance.

like image 885
Ashley Aitken Avatar asked Jan 08 '15 04:01

Ashley Aitken


2 Answers

Update 2015-08-06: As of PR #12349 (available in 1.0.3 and will be available in 1.1 when it ships), the master node is now one of the available nodes in the cluster and you can schedule pods onto it just like any other node in the cluster.


A docker container can only be scheduled onto a kubernetes node running a kubelet (what you refer to as a minion). There is nothing preventing you from creating a cluster where the same machine (physical or virtual) runs both the kubernetes master software and a kubelet, but the current cluster provisioning scripts separate the master onto a distinct machine.

This is going to change significantly when Issue #6087 is implemented.

like image 140
Robert Bailey Avatar answered Oct 22 '22 05:10

Robert Bailey


You need to taint your master node to run containers on it, although not recommended.

Run this on your master node:

kubectl taint nodes --all node-role.kubernetes.io/master-

Courtesy of Alex Ellis' blog post here.

like image 28
loonison101 Avatar answered Oct 22 '22 05:10

loonison101