0
votes

Neebie to the world of Kubernetes AWS EKS and would great to get support.

I am trying to deploy a node app. I have the correct IAM policies attached to my IAM role on EKS, I have also setup the correct tags on the private and public subnets.

My Kubernetes yml looks like this.

kind: Deployment
metadata:
  name: test
spec:
  replicas: 1
  selector:
    matchLabels:
      app: test
  template:
    metadata:
      labels:
        app: test
    spec:
      containers:
        - name: test
          image: test:latest
          ports:
            - containerPort: 3000
          imagePullPolicy: Always
---
kind: Service
apiVersion: v1
metadata:
  name: test
spec:
  type: LoadBalancer
  selector:
    app: test
  ports:
  - protocol: TCP
    port: 80
    targetPort: 9376

The service starts but the external ip just keeps saying pending and no load balancer is provisioned.

Thanks

2

2 Answers

1
votes

To troubleshoot this issue, you can find related failure logs under AWS EKS cluster control plane logs. Please refer this document from AWS with steps to view AWS EKS cluster control plane logs, also with steps to enable control plane logs.

If you have AWS EKS cluster control plane log available, then you can execute following query in CloudWatch Logs Insights. For information about execution of AWS CloudWatch Logs Insights query, please refer this document from AWS. After execution of query, check for value of responseObject.reason field or you can also expand message to view details.

fields @timestamp, @message, requestObject.kind, requestObject.metadata.name,requestObject.spec.type,responseObject.status,responseObject.message,responseObject.reason,requestObject.spec.selector.app
| filter requestObject.spec.type='LoadBalancer' 
| sort @timestamp desc
-1
votes

If you are using Mnikube

minikube tunnel

this will help you.

This command can expose the services of type LoadBalancer.

Here is the reference https://minikube.sigs.k8s.io/docs/commands/tunnel/ .