<p>I have a pod that is essentially a plugin for an apiserver, it's almost no workload pod which task is to externalize watches to another pubsub facility (serves like a bridge from one api to another)
To reduce the latency and amount of real network connections I thought that it may make sense to always deploy its 1-replica deployment to same machine, that is running apiserver itself. It turns out that it's a master node. Pod almost does not take ram and CPU, pure streaming pod without any endpoints - bridge from k8s watches to something other. How can I do that?</p>

xakepp35
<p>If your intention is only to run a specific pod on the master node and <strong>not</strong> open up the master node, you should implement <code>tolerations</code> and <code>nodeSelector</code>. The sample below will always run busybox on the master node:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: busybox
  labels:
    run: busybox
spec:
  restartPolicy: Never
  nodeSelector:
    &lt;a unique label on your master node&gt;: &lt;the label value&gt;
  tolerations:
  - key: node-role.kubernetes.io/master
    operator: Exists
    effect: NoSchedule
  containers:
  - name: busybox
    image: busybox
    imagePullPolicy: IfNotPresent
    command: [&quot;ash&quot;,&quot;-c&quot;,&quot;sleep 3600&quot;]
</code></pre>
