<p>So I recently installed stable/redis-ha cluster (<a href="https://github.com/helm/charts/tree/master/stable/redis-ha" rel="nofollow noreferrer">https://github.com/helm/charts/tree/master/stable/redis-ha</a>) on my G-Cloud based kubernetes cluster. The cluster was installed as a "Headless Service" without a ClusterIP.  There are 3 pods that make up this cluster one of which is elected master.  </p>

<p>The cluster has installed with no issues and can be accessed via redis-cli from my local pc (after port-forwarding with kubectl).</p>

<p>The output from the cluster install provided me with DNS name for the cluster.  Because the service is a headless I am using the following DNS Name </p>

<p>port_name.port_protocol.svc.namespace.svc.cluster.local (As specified by the documentation)</p>

<p>When attempting to connect I get the following error:</p>

<blockquote>
  <p>"redis.exceptions.ConnectionError: Error -2 connecting to
  port_name.port_protocol.svc.namespace.svc.cluster.local :6379. Name does not
  resolve."</p>
</blockquote>

<p>This is not working.</p>

<p>Not sure what to do here.  Any help would be greatly appreciated.</p>

<p>the DNS appears to be incorrect. it should be in the below format</p>

<pre><code>&lt;redis-service-name&gt;.&lt;namespace&gt;.svc.cluster.local:6379

say, redis service name is redis and namespace is default then it should be
redis.default.svc.cluster.local:6379
</code></pre>

<p>you can also use pod dns, like below</p>

<pre><code>&lt;redis-pod-name&gt;.&lt;redis-service-name&gt;.&lt;namespace&gt;.svc.cluster.local:6379

say, redis pod name is redis-0 and redis service name is redis and namespace is default then it should be
redis-0.redis.default.svc.cluster.local:6379
</code></pre>

<p>assuming the service port is same as container port and that is 6379</p>
