I want Ingress to redirect a specific subdomain to one backend and all others to other backend. Basically, I want to define a rule something like the following:
If subdomain is
foo.bar.comthen go tos1, for all other subdomains go tos2
When I define the rules as shown below in the Ingress spec, I get this exception at deployment:
Error: UPGRADE FAILED: cannot re-use a name that is still in use
When I change *.bar.com to demo.bar.com it works, however.
Here's my Ingress resource spec:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test
spec:
  rules:
  - host: foo.bar.com
    http:
      paths:
      - backend:
          serviceName: s1
          servicePort: 80
  - host: *.bar.com
    http:
      paths:
      - backend:
          serviceName: s2
          servicePort: 80
Anyone has an idea if it is possible or not?
 
     
     
     
     
    