title: .Net Core API container on Minikube not running
body: <p>I have a deployment on Minikube for a .Net Core 5 API that is not returning response when I try to invoke it from Postman. When I run a GET from Postman to the exposed port (32580) and endpoint <code>http:// localhost:32580/api/platforms/</code> I get:</p>
  <pre><code>Error: getaddrinfo ENOTFOUND
  </code></pre>
  <p>Oddly enough I was previously getting a <code>Connection refused</code> (before I restarted my Docker desktop). The container works perfectly when I use Docker but once I deployed it to Kubernetes context it no longer works.</p>
  <p>I am unsure how exactly I can debug the container and get more meaningful error detail.</p>
  <p>I have tried the following:</p>
  <ol>
  <li>Checking status of Deployment (platforms-depl)</li>
  </ol>
  <hr />
  <pre><code>NAME             READY   UP-TO-DATE   AVAILABLE   AGE 
  hello-minikube   1/1     1            1           134d
  ping-google      0/1     1            0           2d2h
  platforms-depl   1/1     1            1           115m
  </code></pre>
  <ol start="2">
  <li>Checking status of Pod (platforms-depl-84d7f5bdc6-sgxcp)</li>
  </ol>
  <hr />
  <pre><code>NAME                              READY   STATUS             RESTARTS   AGE 
  hello-minikube-6ddfcc9757-6mfmf   1/1     Running            21         134d
  ping-google-5f84d66fcc-kbb7j      0/1     ImagePullBackOff   151        2d2h
  platforms-depl-84d7f5bdc6-sgxcp   1/1     Running            1          115m
  </code></pre>
  <ol start="3">
  <li>Running <code>kubectl describe pod platforms-depl-84d7f5bdc6-sgxcp</code> gives below output (truncated):</li>
  </ol>
  <hr />
  <pre><code>Status:       Running
  IP:           172.17.0.3
  IPs:
    IP:           172.17.0.3
  Controlled By:  ReplicaSet/platforms-depl-84d7f5bdc6
  Containers:
    platformservice:
      Container ID:   docker://a73ce2dc737206e502df94066247299a6dcb6a038087d0f42ffc6e3b9dd194dd
      Image:          golide/platformservice:latest
      Image ID:       docker-pullable://golide/platformservice@sha256:bbed5f1d7238d2c466a6782333f8512d2e464f94aa64d8670214646a81b616c7      
      Port:           &lt;none&gt;
      Host Port:      &lt;none&gt;
      State:          Running
        Started:      Tue, 28 Sep 2021 15:12:22 +0200
      Ready:          True
      Restart Count:  0
      Environment:    &lt;none&gt;
      Mounts:
        /var/run/secrets/kubernetes.io/serviceaccount from default-token-rl5kf (ro)
  Conditions:
    Type              Status
    Initialized       True
    Ready             True
    ContainersReady   True
    PodScheduled      True
  </code></pre>
  <ol start="4">
  <li><p>When I run <code>docker ps</code> I cannot see the container and it also doesn't appear in the list of running containers in VS Code Docker/Containers extension.</p>
  </li>
  <li><p><code>kubectl get services</code> gives me the following:</p>
  </li>
  </ol>
  <hr />
  <pre><code>NAME                    TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)          AGE 
  hello-minikube          NodePort    10.99.23.44    &lt;none&gt;        8080:31378/TCP   134d
  kubernetes              ClusterIP   10.96.0.1      &lt;none&gt;        443/TCP          134d
  paymentsapi             NodePort    10.111.243.3   &lt;none&gt;        5000:30385/TCP   108d
  platformnpservice-srv   NodePort    10.98.131.95   &lt;none&gt;        80:32580/TCP     2d2h
  </code></pre>
  <p>Then tried pinging the ClusterIP:</p>
  <pre><code>Pinging 10.98.131.95 with 32 bytes of data:
  Request timed out.
  Request timed out.
   
  Ping statistics for 10.98.131.95:
  Packets: Sent = 4, Received = 0, Lost = 4 (100% loss), 
  </code></pre>
  <p>What am I missing?</p>
  <p>I read in suggestions I have to exec into the pod so that I get meaningful output but I'm not sure of the exact commands to run. I tried:</p>
  <pre><code>kubectl exec POD -p platforms-depl-84d7f5bdc6-sgxcp
  </code></pre>
  <p>only to get error:</p>
  <pre><code>kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
  Error from server (NotFound): pods &quot;POD&quot; not found
  </code></pre>
  <p>My environment Docker Linux containers with WSL2 on Windows 10.</p>
  <p>What am I missing?</p>