<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>I'm currently working to automate Kubernetes deployment with NixOS / NixOps. It works quiet well with multiple local VirtualBox nodes. Regarding AWS integration I still have to fix few things. Then I will try to integrate with other cloud providers.</p>

<p>You can have a look to this repository: <a href="https://github.com/thpham/magics/tree/master/k8s-cluster" rel="nofollow noreferrer">NixOps Kubernetes</a>. Do not hesitate to fork and help me improve it.</p>
