apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
ingress.bluemix.net/rewrite-path: "serviceName=nginx rewrite=/"
name: nginx-ingress
namespace: 'default'
spec:
rules:
- host: www.domain.com
http:
paths:
- path: /*
backend:
serviceName: nginx
servicePort: 80
Here I have some ingress config yaml file. When I apply it all working correctly but only when you go by path www.domain.com , when I try to use domain.com , it doesn't work and return me
default backend - 404
What should I do ? Add one more host to the rules:
- host: domain.com
http:
paths:
- path: /*
backend:
serviceName: nginx
servicePort: 80
Like this or I can use better solving of this problem ?