Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

259
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda