I set up Kubernetes on CoreOS on bare metal using the generic install scripts. It's running the current stable release, 1298.6.0, with Kubernetes version 1.5.4.
We'd like to have a highly available master setup, but we don't have enough hardware at this time to dedicate three servers to serving only as Kubernetes masters, so I would like to be able to allow user pods to be scheduled on the Kubernetes master. I set --register-schedulable=true in /etc/systemd/system/kubelet.service but it still showed up as SchedulingDisabled.
I tried to add settings for including the node as a worker, including adding worker TLS certs to /etc/kubernetes/ssl, adding those settings to kubelet.service, adding an /etc/kubernetes/worker-kubeconfig.yaml that pointed to those certs, and added that information to the /etc/kubernetes/manifests/kube-proxy.yaml. I used my existing nodes as a template for what to add. This registered another node under the master's hostname and then both it and the original master node showed up as NotReady,SchedulingDisabled.
This question indicates that scheduling pods on the master node should be possible, but there is barely anything else that I can find on the subject.
Use the below command to untaint all masters
Another way to list all taints in nodes and untaint the tainted one.
lab-a does not have any taint. so we untaint lab-b:
Install jq in ubuntu by:
apt-get install jq
If you are using Kubernetes 1.7 and above:
For anyone using kops on AWS. I wanted to enable scheduling of Pods on master.
$ kubectl get nodes -owide
was giving me this output:And
$ kubectl describe nodes ip-1**-**-**-***.********.master.internal
:Patching the master with this command:
$ kubectl patch node MASTER_NAME -p "{\"spec\":{\"unschedulable\":false}}"
worked for me and scheduling of Pods is now enabled.
Ref: https://github.com/kubernetes/kops/issues/639#issuecomment-287015882
First, get the name of the master
as we can see there is one node with the name of
yasin
and the role ismaster
. If we want to use it as worker we should runI don't know why the master node shows up as
NotReady
; it shouldn't. Try executingkubectl describe node mymasternode
to find out.The
SchedulingDisabled
is because the master node is tainted withdedicated=master:NoSchedule
Execute this command against all your masters to remove the taint:
To understand why that works read up on taints and tolerations.