Elasticsearch clustering on Kubernetes

We’re trying to get a working Elasticsearch cluster on Kubernetes running on our Rancher instance. But we’re running into some networking problems. I’m wondering if anyone else has had the same problem and has a way around it?

I’ve been following the instructions here: https://github.com/pires/kubernetes-elasticsearch-cluster but when the ES instances run they seem to be trying to talk to kubernetes.default.svc (to find other instances of ES nodes to cluster with). However they can’t find this host and fail to cluster.

I assume this address won’t work on rancher because as far as I can tell that kubernetes service is on kubernetes.kubernetes.rancher.internal not kubernetes.default.svc. Currently I can’t find a way to change where ES queries the kubernetes service. Anyone figured a way around this already?