title: Kubectl : Could not resolve host
body: <p>I created one node and I'm running microk8s. I created one Pod and 3 replicasets. I can access trought Cluster IP. But I don't know how to access through the name... Please help me. I'm new in Kubenetes.</p>
  <ol>
  <li>I create</li>
  </ol>
  <pre class="lang-text prettyprint-override"><code>microk8s kubectl create deployment httpenv --image bretfisher/httpenv
  </code></pre>
  <ol start="2">
  <li>Scale</li>
  </ol>
  <pre class="lang-text prettyprint-override"><code>microk8s kubectl scale deployment/httpenv --replicas=3
  </code></pre>
  <ol start="3">
  <li>Expose</li>
  </ol>
  <pre class="lang-text prettyprint-override"><code>microk8s kubectl expose deployment/httpenv --port 8888
  </code></pre>
  <ol start="4">
  <li>Show Info</li>
  </ol>
  <pre class="lang-text prettyprint-override"><code>microk8s kubectl get all
  </code></pre>
  <pre class="lang-text prettyprint-override"><code>NAME                          READY   STATUS    RESTARTS   AGE
  pod/httpenv-bd844d85f-9xk9l   1/1     Running   0          18m
  pod/httpenv-bd844d85f-jf85j   1/1     Running   0          18m
  pod/httpenv-bd844d85f-p5kzg   1/1     Running   0          18m
  
  NAME                 TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
  service/httpenv      ClusterIP   10.152.183.91   &lt;none&gt;        8888/TCP   13m
  service/kubernetes   ClusterIP   10.152.183.1    &lt;none&gt;        443/TCP    24h
  
  NAME                      READY   UP-TO-DATE   AVAILABLE   AGE
  deployment.apps/httpenv   3/3     3            3           18m
  
  NAME                                DESIRED   CURRENT   READY   AGE
  replicaset.apps/httpenv-bd844d85f   3         3         3       18m
  </code></pre>
  <ol start="5">
  <li>Try to access</li>
  </ol>
  <p>From node :</p>
  <pre class="lang-text prettyprint-override"><code>curl -i 10.152.183.91:8888
  
     HTTP/1.1 200 OK
  </code></pre>
  <pre class="lang-text prettyprint-override"><code>curl -i httpenv:8888
  
     curl: (6) Could not resolve host: httpenv
  </code></pre>