<p>I've deployed a pod in AKS and I'm trying to connect to it via an external load balancer. </p>

<p>The items I done for troubleshooting are:</p>

<ul>
<li>Verified (using kubectl) pod deployed in k8s and is running properly.</li>
<li>Verified (using netstat) Network port 80 is in ‘listening’. I logged into the pod using 'kubectl exec'</li>
</ul>

<p>The .yaml file I used to deploy is:</p>

<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: qubo
  namespace: qubo-gpu
spec:
  replicas: 1
  selector:
    matchLabels:
      app: qubo
  template:
    metadata:
      labels:
        app: qubo
    spec:
      containers:
        - name: qubo-ctr
          image: &lt;Blanked out&gt;
          resources:
            limits:
              nvidia.com/gpu: 1
          command: ["/app/xqx"]
          args: ["80"]
          ports:
            - containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
  name: api
  namespace: qubo-gpu
  annotations:
spec:
  type: LoadBalancer
  ports:
    - protocol: TCP
      port: 80
  selector:
    app: qubo

</code></pre>

Rajesh
<p>Turned out to be my bug in the code of how I opened the socket. In hopes this will help someone else, this is how I went about troubleshooting:</p>

<ol>
<li>Got IP for pod:
<code>kubectl get pods -o wide</code></li>
<li>Created a new ubuntu pod in cluster:
<code>kubectl run -it --rm --restart=Never --image=ubuntu:18.04 ubuntu bash</code></li>
<li>Downloaded curl to new pod:
<code>apt-get update &amp;&amp; apt-get install -y curl</code></li>
<li>Tried to curl to the pod IP (from step 1):
<code>curl -v -m5 http://&lt;Pod IP&gt;:80</code></li>
</ol>

<p>Step 4 failed for me, however, I was able to run the docker container successfully on my machine and connect. Issue was that I opened the connection as localhost instead of 0.0.0.0.</p>
