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

249
Visualizações
Enable rewrite for a particular host in ingress nginx configuration

I have below ingress-nginx configuration file.

It rewrites request for one.example.com. I have added another domain, but I don't want rewrite to happen for other domain.

I went through doc, but there is now rewrite example for multiple host setup.

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-service
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/use-regex: "true"
    nginx.ingress.kubernetes.io/rewrite-target: /$1
    certmanager.k8s.io/cluster-issuer: "letsencrypt-example-prod"
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
  tls:
    - hosts:
        - one.example.com
        - two.example.com
      secretName: super-secret
  rules:
    - host: one.example.com
      http:
        paths:
          - path: /customer/?(.*)
            pathType: Prefix
            backend:
              service:
                name: customer-srv
                port:
                  number: 3000
      host: two.example.com
      http:
        paths:
        - path: /
          pathType: Prefix
          backend:
            service:
              name: kube-prometheus-grafana
              port:
                number: 80

I could create two separate ingress files for each host.

What will happen in that case it will create two load balancers with different dns?

(cluster is hosted on aws)

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You can create two separate ingress.

In that case, nothing will change your ingress controller IP would be same only for DNS.

What will happen in that case it will create two load balancers with different dns?

No, it won't create two load balancers.

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