<p>I have a Google Container Engine cluster with 21 nodes, there is one pod in particular that I need to always be running on a node with a static IP address (for outbound purposes). </p>

<p>Kubernetes supports <a href="https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/design/daemon.md" rel="nofollow">DaemonSets</a></p>

<p>This is a way to have a pod be deployed to a specific node (or in a set of nodes) by giving the node a label that matches the nodeSelector in the DaemonSet. You can then assign a static IP to the VM instance that the labeled node is on. However, GKE doesn't appear to support the DaemonSet kind.</p>

<pre><code>$ kubectl create -f go-daemonset.json 
error validating "go-daemonset.json": error validating data: the server could not find the requested resource; if you choose to ignore these errors, turn validation off with --validate=false

$ kubectl create -f go-daemonset.json --validate=false
unable to recognize "go-daemonset.json": no kind named "DaemonSet" is registered in versions ["" "v1"]
</code></pre>

<p>When will this functionality be supported and what are the workarounds?</p>

<p>If you only want to run the pod on a single node, you actually don't want to use a DaemonSet. DaemonSets are designed for running a pod on <em>every</em> node, not a single specific node.</p>

<p>To run a pod on a specific node, you can use a nodeSelector in the pod specification, as documented in the <a href="http://kubernetes.io/v1.1/docs/user-guide/node-selection/README.html">Node Selection example in the docs</a>.</p>

<hr>

<p>edit: But for anyone reading this that does want to run something on every node in GKE, there are two things I can say:</p>

<p>First, DaemonSet will be enabled in GKE in version 1.2, which is planned for March. It isn't enabled in GKE in version 1.1 because it wasn't considered stable enough at the time 1.1 was cut.</p>

<p>Second, if you want to run something on every node before 1.2 is out, we recommend creating a replication controller with a number of replicas greater than your number of nodes and asking for a <code>hostPort</code> in the container spec. The <code>hostPort</code> will ensure that no more than one pod from the RC will be run per node.</p>
