Different ingress in different Namespace in kubernetes -


i have created 2 different namespaces different environment. 1 devops-qa , devops-dev. created 2 ingress in different namespaces. while creating ingress of qa env in devops-qa namespace, rules written inside ingress of qa working fine. means able access webpage of qa env. moment create ingress of dev env in devops-dev namespace, able access webpage of dev env wont able access webpage of qa. , when delete dev ingress again able access qa env website

below ingree of both dev , qa env.

dev ingress

apiversion: extensions/v1beta1 kind: ingress metadata:   annotations:     kubernetes.io/ingress.class: "nginx"   name: cafe-ingress-dev   namespace: devops-dev spec:   tls:   - hosts:     - cafe-dev.example.com     secretname: default-token-drk6n   rules:   - host: cafe-dev.example.com     http:       paths:       - path: /         backend:           servicename: miqpdev-svc           serviceport: 80 

qa ingress

apiversion: extensions/v1beta1 kind: ingress metadata:   annotations:     kubernetes.io/ingress.class: "nginx"    name: cafe-ingress-qa   namespace: devops-qa spec:   tls:   - hosts:     - cafe-qa.example.com     secretname: default-token-jdnqf   rules:   - host: cafe-qa.example.com     http:       paths:       - path: /greentea         backend:           servicename: greentea-svc           serviceport: 80       - path: /blackcoffee         backend:           servicename: blackcoffee-svc           serviceport: 80 

the token mentioned in ingress file of each namespace. , nginx ingress controller running in qa namespace how can run both ingress , able websites deployed in both dev , qa env ?

i suggest using https://github.com/kubernetes/ingress/tree/master/controllers/nginx can confirm capable of correctly merging multiple ingress definitions same domain


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -