title: Why can't I access my AWS EKS deployment/service?
body: <p>I have an AWS EKS cluster, in which there are two pods running: one for a redis cache, and the other for a GraphQL API.</p>
  <p>Now I will present the config files for my kubernetes cluster.</p>
  <p><code>cache-deployment.yaml</code></p>
  <pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: chatto-cache-deployment
  spec:
    replicas: 1
    selector:
      matchLabels:
        tier: cache
    template:
      metadata:
        labels:
          tier: cache
      spec:
        containers:
          - name: cache-container
            image: redis
            imagePullPolicy: Always
            resources:
              limits:
                memory: 512Mi
                cpu: &quot;1&quot;
              requests:
                memory: 256Mi
                cpu: &quot;0.2&quot;
  </code></pre>
  <p><code>cache-service.yaml</code></p>
  <pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
  kind: Service
  metadata:
    name: chatto-cache-service
  spec:
    type: ClusterIP
    selector:
      tier: cache
    ports:
      - protocol: TCP
        port: 6379
        targetPort: 6379
  </code></pre>
  <p><code>server-deployment.yaml</code></p>
  <pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: chatto-server-deployment
  spec:
    replicas: 1
    selector:
      matchLabels:
        tier: server
    template:
      metadata:
        labels:
          tier: server
      spec:
        containers:
          - name: server-container
            image: rocketblast2481/chatto-server
            imagePullPolicy: Always
            resources:
              limits:
                memory: 512Mi
                cpu: &quot;1&quot;
              requests:
                memory: 256Mi
                cpu: &quot;0.2&quot;
            env:
              - name: DB_USERNAME
                valueFrom: 
                  configMapKeyRef:
                    name: env-config-map
                    key: DB_USERNAME
              - name: DB_PASSWORD
                valueFrom: 
                  configMapKeyRef:
                    name: env-config-map
                    key: DB_PASSWORD
              - name: DB_HOST
                valueFrom: 
                  configMapKeyRef:
                    name: env-config-map
                    key: DB_HOST
              - name: DB_PORT
                valueFrom: 
                  configMapKeyRef:
                    name: env-config-map
                    key: DB_PORT
              - name: DB_DATABASE
                valueFrom: 
                  configMapKeyRef:
                    name: env-config-map
                    key: DB_DATABASE
              - name: REDIS_HOST
                valueFrom: 
                  configMapKeyRef:
                    name: env-config-map
                    key: REDIS_HOST
              - name: REDIS_PORT
                valueFrom: 
                  configMapKeyRef:
                    name: env-config-map
                    key: REDIS_PORT
  </code></pre>
  <p><code>server-service.yaml</code></p>
  <pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
  kind: Service
  metadata:
    name: chatto-server-service
  spec:
    type: LoadBalancer
    selector:
      tier: server
    ports:
      - protocol: TCP
        port: 80
        targetPort: 80
  </code></pre>
  <p>Okay, here's the problem. As you can see, the <code>server-service</code> is of type <code>LoadBalancer</code>.</p>
  <p>When I run the command, <code>kubectl get services</code>, this is the output:</p>
  <pre><code>NAME                    TYPE           CLUSTER-IP      EXTERNAL-IP                                                              PORT(S)        AGE
  chatto-cache-service    ClusterIP      10.100.73.117   &lt;none&gt;                                                                   6379/TCP       5h17m
  chatto-server-service   LoadBalancer   10.100.11.249   afe3adae38c0242c8be0795609ee8a6c-424128423.us-east-2.elb.amazonaws.com   80:31643/TCP   17m
  kubernetes              ClusterIP      10.100.0.1      &lt;none&gt;                                                                   443/TCP        6h35m
  </code></pre>
  <p>I copied the EXTERNAL-IP of the chatto-server-service and slapped it into Postman, but I get an error that the connection refused.</p>
  <p>Could someone tell me why this might be happening? It might be because of the way I have configured the security groups, but I don't know for sure.</p>
  <p>Thanks for any feedback and help and please let me know if you need any other information.</p>
  <p><strong>Edit:</strong></p>
  <p>Here is a screenshot of the load balancer:</p>
  <p><a href="https://i.stack.imgur.com/16TU9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/16TU9.png" alt="enter image description here" /></a></p>