Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

250
Views
How ingress controller is providing dns names?

I am trying to understand how ingress controller works in kubernetes.

I have deployed nginx ingress controller on bare metal k8s cluster (referred to kind ingress docs) localhost now points to nginx default page.

I have deployed an app with an ingress resource with host as "foo.localhost". I can access my app on foo.localhost now.

I would like to know how nginx was able to do it without any modificaion on /etc/hosts file.

I also want to access my app from different machine over same/different network.

I have used ngrok for this

ngrok http foo.localhost

but it points to nginx default page and not my app

How can I access it using ngrok if I don't want to use port forward or kube proxy.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

On your machine, localhost and foo.localhost all resolve to the same address, 127.0.0.1. This is already there, it is not something nginx or k8s does. That's the reason why you cannot access that from another machine, because that name resolves to the localhost for that machine as well, not the one running your k8s ingress. When you exposed it using ngrok, it exposes it using a different name. When you try to access the ingress using that name, the request contains a Host header with the ngrok URL, which is not the same as foo.localhost, so the ingress thinks the request is for a different domain.

Try exposing your localhost in the ingress using the ngrok url.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!