<p>Has anyone managed to run a H2O Cluster in Kubernetes?</p>

<p>I tried 2 options both using flatfile 1) using StatefulSet, but since the ip generated for the pod can change the cluster is unreliable 2) using a bunch of pairs of service/deployments and specifying the the flatfile the dns name of the service but the cluster doesn't start up correctly</p>

<p>none of the above work. Is there any way to make it work?</p>

<p>If multicast packets can be transmitted between the pods, then you could rely on that for the cluster formation.  Just specify a unique -name for all the nodes to share.  This is easy if it works, with no code changes.</p>

<p>UPDATE (2018/04/21) -- one of my colleagues says:</p>

<p>I used weave as the network layer, what that does is provide a connection between all the containers for that kubernetes pod group, then you dont need to use the flatfile in H2O, as h2o will multicast on startup, weave will take the multicast and send it to all instances of the pod.</p>

<p>in K8s run this: kubectl apply --filename <a href="https://git.io/weave-kube-1.6" rel="nofollow noreferrer">https://git.io/weave-kube-1.6</a></p>

<hr>

<p>If multicast is not an option, there isn't an out-of-the-box solution today for Kubernetes that I'm aware of.</p>

<p>You will need an orchestrator to distribute the flatfile information.</p>

<p>There are at least three examples of code to do this for other environments in the H2O github repos.</p>

<ol>
<li>ec2 scripts</li>
</ol>

<p><a href="https://github.com/h2oai/h2o-3/tree/master/ec2" rel="nofollow noreferrer">https://github.com/h2oai/h2o-3/tree/master/ec2</a></p>

<ol start="2">
<li>The hadoop driver</li>
</ol>

<p><a href="https://github.com/h2oai/h2o-3/blob/master/h2o-hadoop/h2o-mapreduce-generic/src/main/java/water/hadoop/h2omapper.java" rel="nofollow noreferrer">https://github.com/h2oai/h2o-3/blob/master/h2o-hadoop/h2o-mapreduce-generic/src/main/java/water/hadoop/h2omapper.java</a></p>

<p>In particular, look at how this class gets overridden:</p>

<p><a href="https://github.com/h2oai/h2o-3/blob/master/h2o-core/src/main/java/water/init/AbstractEmbeddedH2OConfig.java" rel="nofollow noreferrer">https://github.com/h2oai/h2o-3/blob/master/h2o-core/src/main/java/water/init/AbstractEmbeddedH2OConfig.java</a></p>

<ol start="3">
<li>The sparkling water driver in the sparkling water repo.</li>
</ol>
