<p>On NixOS is is easy to set up Kubernetes by a single line of config:</p>

<pre><code>services.kubernetes.roles = ["master" "node"];
</code></pre>

<p>This installs both the master and node components on the local system and therefore creates a nice little working local kubernetes "cluster".</p>

<p>If I want to set up a "real" cluster I need to install it over multiple hosts, but I'm not sure about the intended way to connect them.</p>

<p>If I install only the master components on one host and only the node components on another node, how do I tell the node where to find its master?</p>

<p>There are quite a few <a href="https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/cluster/kubernetes/default.nix" rel="noreferrer">configuration options</a>, but I'm not sure how to use them correctly. Is anyone aware of some example setup? </p>

<p>Have a look at <a href="https://youtu.be/XgZWbrBLP4I?t=29m16s" rel="nofollow noreferrer">the latter part</a> of <a href="https://stackoverflow.com/users/1612283/offlinehacker">Jaka Hudoklin/offlinehacker</a>'s NixCon '15 presentation about Kubernetes on NixOS at GateHub. It has an example configuration that configures docker to use a bridge interface. You can then use openvswitch to link the networks together.</p>
