EKS in private Subnet , Load Balancer in public subnet

风格不统一 提交于 2019-12-04 03:59:45

I had the same issue and it was because I did not tag the VPC subnets properly: https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html

I had to add the key: kubernetes.io/cluster/{eks-cluster-name} value: shared tag to the VPC

Then you can create a LB using a service with the type LoadBalancer

apiVersion: v1
kind: Service
metadata:
  name: helloworld
  labels:
    app: helloworld
spec:
  ports:
  - port: 80
    targetPort: 8080
  selector:
    app: helloworld
  type: LoadBalancer

This might help during the service creation: https://blog.giantswarm.io/load-balancer-service-use-cases-on-aws/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!