Utah Tech Logo

IT3300

DevOps virtualization

Cluster Creation EKS

Connect kubectl to AWS

I started with a blank ubuntu vm (one that had no other garbage on it):

Now create a service of type LoadBalancer

    apiVersion: v1
    kind: Service
    metadata:
      name: nginx
      labels:
        app: nginx
      annotations:
        service.beta.kubernetes.io/aws-load-balancer-scheme: "internet-facing"
    spec:
      type: LoadBalancer
      loadBalancerClass: eks.amazonaws.com/nlb
      selector:
        app: nginx
      ports:
        - name: http
          port: 80
          targetPort: 80
          protocol: TCP

Apply the file.

You should be able to see a public endpoint for kubectl get svc. See if you can connect and see nginx. Might take a few minutes. (Make sure you use http and NOT https)