How to deny external access to a port in a pod deployed on kubernetes (eks)?

3/23/2021

I have a pod on EKS running a process that listens to two different ports: 8080 and 8443. Only the 8443 port is exposed through a service but I noticed the 8080 can still be accessed using the podIP. The 8080 port should only be reachable from inside the pod, how can I close it from all external access?

-- molok
amazon-eks
kubernetes
kubernetes-pod

0 Answers