0

I have an nginx app set up as load balancer in my k8s infrastructure and I want to block access to it by server ip.

I have assigned to it a public IP address that I used to set up all the DNS entries that I needed, but the service is still accessible by plain IP address.

Is there a k8s way of blocking access that is not behind a domain name?

  • https://stackoverflow.com/questions/29104943/how-to-disable-direct-access-to-a-web-site-by-ip-address – Gicu Aftene Dec 15 '22 at 10:45
  • I saw many similar answers, but I was wondering if there was a k8s way with annotations or similar – Domenico Dec 15 '22 at 10:49
  • Mhh i don't think so... that's because kubernetes manage the infrastructure and delegates nginx in order to manage the web server. So nginx can manage the request serving a response if the request was made by server name (domain) or not. – Gicu Aftene Dec 15 '22 at 10:55

0 Answers0