I am using AKS and I need to make the ingress controller accessible by host and IP (to be accessed traffic manager), I am using Nginx Ingress rules as below: for example using https://foo.bar.com and https://14.15.16.222
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: foo
namespace: default
spec:
tls:
- hosts:
- foo.bar.com
secretName: foo-secret
rules:
- host: foo.bar.com
http:
paths:
- backend:
serviceName: echoheaders-x
servicePort: 80
path: /
The below configuration did the trick eventhough I get a certificate error with the IP access.
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: foo
namespace: default
spec:
tls:
- hosts:
- foo.bar.com
secretName: foo-secret
rules:
- host: foo.bar.com
http:
paths:
- backend:
serviceName: echoheaders-x
servicePort: 80
path: /
http:
paths:
- backend:
serviceName: echoheaders-x
servicePort: 80
path: /