title: Pods cannot communicate with each other
body: <p>I have two jobs that will run only once. One is called <code>Master</code> and one is called <code>Slave</code>. As the name implies a Master pod needs some info from the slave then queries some API online.
  A simple scheme on how the communicate can be done like this:</p>
  
  <pre><code>Slave --- port 6666 ---&gt; Master ---- port 8888 ---&gt; internet:www.example.com
  </code></pre>
  
  <p>To achieve this I created 5 yaml file:</p>
  
  <ol>
  <li>A job-master.yaml for creating a Master pod:</li>
  </ol>
  
  <pre><code>apiVersion: batch/v1
  kind: Job
  metadata:
    name: master-job
    labels:
      app: master-job
      role: master-job
  spec:
    template:
      metadata:
        name: master
      spec:
        containers:
        - name: master
          image: registry.gitlab.com/example
          command: ["python", "run.py", "-wait"]
          ports:
          - containerPort: 6666
  
        imagePullSecrets:
        - name: regcred
        restartPolicy: Never
  
  </code></pre>
  
  <ol>
  <li>A service (ClusterIP) that allows the Slave to send info to the Master node on port 6666:</li>
  </ol>
  
  <pre><code>apiVersion: v1
  kind: Service
  metadata:
    name: master-service
    labels:
      app: master-job
      role: master-job
  spec:
    selector:
      app: master-job
      role: master-job
    ports:
      - protocol: TCP
        port: 6666
        targetPort: 6666
  </code></pre>
  
  <ol start="2">
  <li>A service(NodePort) that will allow the master to fetch info online:</li>
  </ol>
  
  <pre><code>apiVersion: v1
  kind: Service
  metadata:
    name: master-np-service
  spec:
    type: NodePort
    selector:
      app: master-job
    ports:
      - protocol: TCP
        port: 8888
        targetPort: 8888
        nodePort: 31000
  </code></pre>
  
  <ol start="3">
  <li>A job for the Slave pod:</li>
  </ol>
  
  <pre><code>apiVersion: batch/v1
  kind: Job
  metadata:
    name: slave-job
    labels:
      app: slave-job
  spec:
    template:
      metadata:
        name: slave
      spec:
        containers:
        - name: slave
          image: registry.gitlab.com/example2
          ports:
          - containerPort: 6666
          #command: ["python", "run.py", "master-service.default.svc.cluster.local"]
          #command: ["python", "run.py", "10.106.146.155"]
          command: ["python", "run.py", "master-service"]
        imagePullSecrets:
        - name: regcred
        restartPolicy: Never
  </code></pre>
  
  <ol start="5">
  <li>And a service (ClusterIP) that allows the Slave pod to send the info to the Master pod:</li>
  </ol>
  
  <pre><code>apiVersion: v1
  kind: Service
  metadata:
    name: slave-service
  spec:
    selector:
      app: slave-job
    ports:
      - protocol: TCP
        port: 6666
        targetPort: 6666
  </code></pre>
  
  <p>But no matter what I do (as it can be seen in the job_slave.yaml file in the commented lines) they cannot communicate with each other except when I put the IP of the Master node in the command section of the Slave. Also the Master node cannot communicate with the outside world (even though I created a <code>configMap</code> with <code>upstreamNameservers: | ["8.8.8.8"]</code>
  Everything is running in a minikube environment.
  But I cannot pinpoint what my problem is. Any help is appreciated. </p>