<p>I have two pods with the following configuration:</p>

<p>POD 1 YAML FILE:</p>

<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
 name: pmplab-nginx-deployment
 labels:
  service: pmplab-nginx-service
spec:
 selector:
  matchLabels:
   app: pmplab-nginx
 template:
  metadata:
   labels:
    app: pmplab-nginx
  spec:
   containers:
    - image: nginx-pmplab-kubernetes
      name: pmplab-nginx
      imagePullPolicy: IfNotPresent
      ports:
       - containerPort: 80
</code></pre>

<p>POD 2 YAML FILE:</p>

<pre><code>apiVersion: v1
kind: Deployment
metadata:
 name: pmplab-login-deployment
 labels:
  service: pmplab-login-service
spec:
 selector:
  matchLabels:
   app: pmplab-login
 template:
  metadata:
   labels:
    app: pmplab-login-selector
  spec:
   containers:
    - image: login-pmplab-kubernetes
      name: login-pmplab
      imagePullPolicy: IfNotPresent
      ports:
       - containerPort: 10070
</code></pre>

<p>SERVICE YAML FILE:</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
 name: pmplab-login-service
 namespace: default
spec:
 selector:
  app: pmplab-login-selector
 ports:
  - name: login
    port: 10070
</code></pre>

<p>I want to <code>curl</code> POD2 from POD1.</p>

<p>Right now if i use the POD2 IP from the command <code>sudo kubectl get pods -o wide --all-
namespaces</code> it works but i can't do it using the service.</p>

<p>I have tried:</p>

<p><code>curl pmplab-login-service:10070</code> -> <code>curl: (6) Could not resolve host: pmplab_login_service</code></p>

<p><code>curl $(PMPLAB_LOGIN_SERVICE_HOST):10070</code> -> <code>curl: (7) Failed to connect to 10.99.143.9 port 10070: Connection timed out</code></p>

Jaume Garcia Sanchez
<p>After so much research i realized that kore-dns did not have endpoints then i restarted minikube and now everything works fine now.</p>
