<p>I'm aware that running a pod(s) on a master node(s) is against kubernetes best practices! Nevertheless, in my virtual environment, I'd like to run a pod on a master node. How can I do that?</p>

Lukasz Dynowski
<p>I found a solution. You can remove <code>taint</code> that prohibits <code>kubernetes scheduler</code> to schedule pods on a master node(s).   </p>

<pre class="lang-sh prettyprint-override"><code># Get all nodes.
$ kubectl get nodes
NAME        STATUS   ROLES     AGE   VERSION
compute01   Ready    compute   16d   v1.15.0
master      Ready    master    16d   v1.15.0
web01       Ready    web       16d   v1.15.0

# Check if there is a NoSchedule taint on master node.  
$ kubectl get node master -o json
...
"taints": [
    {
        "effect": "NoSchedule",
        "key": "node-role.kubernetes.io/master"
    }
]
...

# Delete node-role.kubernetes.io/master taint from all nodes that have it.
$ kubectl taint nodes --all node-role.kubernetes.io/master-
node "node/master" untainted
taint "node-role.kubernetes.io/master" not found
taint "node-role.kubernetes.io/master" not found
</code></pre>

<p>If you want make you master node schedulable again then, you will have to recreate deleted taint with bellow command.</p>

<pre class="lang-sh prettyprint-override"><code>$ kubectl taint node master node-role.kubernetes.io/master=:NoSchedule
node/master tainted
</code></pre>
