<p>I have deployed a small app using the following yaml. </p>

<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
    name: simpledotnetapi-deployment
spec:
    replicas: 1
    selector:
        matchLabels:
            app: simpledotnetapi-pod
    template:
        metadata:
            labels:
                app: simpledotnetapi-pod
        spec:
            imagePullSecrets:
              - name: kimagereadersecret
            containers:
              - name: simpledotnetapi
                image: docker.io/coreyperkins/simpledotnetapi:latest
                ports:
                  - containerPort: 5000
---
apiVersion: v1
kind: Service
metadata:
    name: simpledotnetapi-service
spec:
    type: LoadBalancer
    ports:
    - port: 80
      targetPort: 5000
      nodePort: 30008
    selector:
       app: simpledotnetapi-pod
       type: front-end
</code></pre>

<p>The services tab in the K8 dashboard shows the following:</p>

<pre><code>Name: simpledotnetapi-service
Cluster IP: 10.0.133.156
Internal Endpoints:
simpledotnetapi-service:80 TCP
simpledotnetapi-service:30008 TCP
External Endpoints:
13.77.76.204:80
</code></pre>

<p>-- output from kubectl.exe describe svc simpledotnetapi-service</p>

<pre><code>λ kubectl.exe describe svc simpledotnetapi-service
Name:                     simpledotnetapi-service
Namespace:                default
Labels:                   &lt;none&gt;
Annotations:              kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"name":"simpledotnetapi-service","namespace":"default"},"spec":{"ports":[{"nodePort":3...
Selector:                 app=simpledotnetapi-pod,type=front-end
Type:                     LoadBalancer
IP:                       10.0.133.156
LoadBalancer Ingress:     13.77.76.204
Port:                     &lt;unset&gt;  80/TCP
TargetPort:               5000/TCP
NodePort:                 &lt;unset&gt;  30008/TCP
Endpoints:                &lt;none&gt;
Session Affinity:         None
External Traffic Policy:  Cluster
Events:
  Type    Reason                Age               From                Message
  ----    ------                ----              ----                -------
  Normal  EnsuringLoadBalancer  33m (x4 over 2h)  service-controller  Ensuring load balancer
  Normal  EnsuredLoadBalancer   33m (x4 over 2h)  service-controller  Ensured load balancer
</code></pre>

<p>When I go to the pod I can see that my docker container is running just fine, on port 5000, as instructed. However, when I navigate to <a href="http://13.77.76.204/api/values" rel="nofollow noreferrer">http://13.77.76.204/api/values</a> I should see an array returned, but instead the connection times out (ERR_CONNECTION_TIMED_OUT in Chrome). I have tested this Docker container locally and it works just fine. My assumption is that I've muckered up the "containerPort" on the pod spec (under Deployment), but I am certain that the container is alive on port 5000. Perhaps I am missing some configuration bits? However, looking through samples and the documentation I haven't been able to find out why the connection is not being made to the pod but I do not see any activity in the pods logs aside from the initial launch of the app.</p>

<p>There are label/selector mismatches in your pod/service definitions.</p>

<p>You are using <code>app: simpledotnetapi-pod</code> for pod template, and <code>app: simpledotnetapi</code> as a selector in your service definition. Edit one of them to match.</p>

<p>Also the label <code>type: front-end</code> doesn't exist on your pod template. You need to add it, or maybe remove this from the service selectors.</p>

<p>After that, your endpoint list should have entries for your pod when it becomes ready.</p>
