<p>I have created a service(grpc-service) on my Kubernetes cluster(ubuntu 16.04) and cannot find it's dns Hostname </p>

<p>Also as a side node , my pod does not show up on nslookup (it works with busybox)</p>

<pre><code> kubectl exec -ti server-pod -- nslookup kubernetes.default
OCI runtime exec failed: exec failed: container_linux.go:345: starting container process caused "exec: \"nslookup\": executable file not found in $PATH": unknown
</code></pre>

<p>expecting somthing similar to:</p>

<pre><code>grpc-service.&lt;namespace&gt;.svc.&lt;cluster-domain&gt; which is usually
grpc-service.default.svc.cluster.local
</code></pre>

<p>but cannot find it ,neither can ping/curl it
(curl -I grpc-service)</p>

Tanmay Shrivastava
<p>@Tanmay Shrivastava</p>

<pre><code>clusterIP: None
However, you can use headless service,  use statefulset

apiVersion: v1
kind: Service
metadata:
  name: httpd-service
  labels:
    app: httpd
spec:
  ports:
  - port: 80
    name: web
  clusterIP: None
  selector:
    app: httpd
</code></pre>

<p>Check this link: <a href="https://supergiant.io/blog/creating-stateful-apps-with-kubernetes-statefulsets/" rel="nofollow noreferrer">https://supergiant.io/blog/creating-stateful-apps-with-kubernetes-statefulsets/</a></p>
