Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NodePort not working with AWS EKS server endpoint

eks server endpoint is xxxxxxxxxxx.xxx.eks.amazonaws.com and I've created a yml file with a deployment and service object.

[ec2-user@ip-]$ kubectl get svc
NAME         TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)          AGE
fakeserver   NodePort    10.100.235.246   <none>        6311:30002/TCP   1h
kubernetes   ClusterIP   10.100.0.1       <none>        443/TCP          1d

When I browse xxxxxxxxxxx.xxx.eks.amazonaws.com:30002 returns too long to respond. security groups have all traffic in inbound rules.

like image 306
Ratul Avatar asked Jul 25 '18 19:07

Ratul


1 Answers

You should be using your Worker Node's IP (one of the nodes if you have more than one), not the EKS server endpoint. The EKS server endpoint is the master plane, meant to process requests pertaining to creating/deleting pods, etc.

You also need to make sure that the Security Group of your Node's will allow the traffic.

With this in place you should be able to make the request to your NodePort service. For Example:

http://your-workernodeIp:NodePortNumber

like image 102
nacho10f Avatar answered Oct 09 '22 05:10

nacho10f