Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use EKS NodePort service with port 80 and 443

I am using EKS (K8s service natively provided by AWS).

My questions are:

  1. Is it possible to expose NodePort service through port 80 and 443 (default NodePort range is 30000 - 32767).
  2. If it is, how to do that with EKS.

Note I know the consequences of using NodePort services and have researched alternatives like LoadBalancer and Ingress. I am going ahead with NodePort because I have to.

like image 262
Tran Triet Avatar asked Oct 30 '25 11:10

Tran Triet


1 Answers

  1. No. According to the EKS AMI Source, the worker nodes' kubelets use the default configuration for --service-node-port-range. You will be assigned an external port number between 30000-32767.

  2. You have the alternative of using the node's hostNetwork to expose port 80 and 443 as hostPort. A description of the setup can be found here. Just keep in mind the networking constraints and caveats of using a hostNetwork!

like image 119
Frank Yucheng Gu Avatar answered Nov 02 '25 08:11

Frank Yucheng Gu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!