简体   繁体   中英

Allow EC2 Instances to communicate with the Services of Kubernetes deployments

I am trying to get a Windows Server EC2 instance to communicate with a running Kube.netes Service. I do not want to have to route through the inte.net, as both the EC2 Instance and Service are sitting within a private su.net.

I am able to get communication through when using the private IP address of the Service, but because of the nature of Kube.netes when the Service goes down, for whatever reason, the private IP can change. I want to avoid this if possible. I either want to communicate with the service using a static private DNS name or some kind of static private IP address I can create and bind to the Service during creation. Is either of this possible to do?

PS I have tried looking into internal LoadBalancers, but I can't get it to work. Don't even know if this is the right direction. https://kube.netes-sigs.github.io/aws-load-balancer-controller/v2.2/guide/service/annotations/#traffic-routing . Currently I am using these annotations for EIP binding for some public-facing services.

Why not create a kubeconfig to access the EKS services through kubectl? See documenation: https://docs.aws.amazon.com/eks/latest/userguide/create-kubeconfig.html

or you want to send traffic to the services?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM