<p>I am new to kubernetes. I successfully created a headless service for aerospike-kubernetes. I logged into docker container and verified that the mesh contains all the replicas. I have used <a href="https://github.com/aerospike/aerospike-kubernetes/blob/master/aerospike-statefulset.yaml" rel="nofollow noreferrer">https://github.com/aerospike/aerospike-kubernetes/blob/master/aerospike-statefulset.yaml</a>  for the same. </p>

<p>Now since its a headless service clusterIP is "none" and i am writing a golang program to connect to the aerospike. I am puzzled as to what should go in the IPaddress to connect to aerospike. What should i give in place of xxx-xxx-xxx-xxx ? how can i generate an Internal IP so that i can connect to the entire mesh?</p>

<pre><code>client, err := as.NewClient("xxx-xxx-xxx-xxx", 3000)
if err != nil {
    log.Fatal(err)
}
</code></pre>

<p>This golang project will be deployed as a pod so an internal IP would suffice. </p>

<blockquote>
  <p>headless service clusterIP is "none" </p>
</blockquote>

<p>This simply means we don't use the load balancer/reverse proxy mode, but rather DNS Round-Robin mode for the service endpoint.</p>

<p>By default, visibility of the Aerospike cluster is limited to within the Kubernetes environment. You can use the service name generated by kube-dns to connect. The address would take the form of: &lt;service&gt;.&lt;namespace&gt;.svc.cluster.local. In other words: <code>aerospike.aerospike-cluster-1.svc.cluster.local</code> if you've left it as defaults.</p>
