I deployed the book application from Istio in a AKS cluster that has a Loadbalancer and a custom domain. Here is the gateway.yaml
:
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: bookinfo-gateway
spec:
selector:
istio: ingressgateway # use istio default controller
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "x.myaks.domain"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: bookinfo
spec:
hosts:
- "x.myaks.domain"
gateways:
- bookinfo-gateway
http:
- match:
- uri:
exact: /productpage
- uri:
prefix: /static
- uri:
exact: /login
- uri:
exact: /logout
- uri:
prefix: /api/v1/products
route:
- destination:
host: productpage
port:
number: 9080
The problem is, when I navigate in my browser to x.myaks.domain/productpage
, I get an DNS unresolved error. Does anyone know how to expose services with Istio in AKS clusters under a domain?
Doing curl -H "Host: x.myaks.domain" loadbalancerip/productpage
works perfectly
Update
I just have the info that an automatic DNS entry in Azure is created when the Ingress ressource is defined.
For ingress objects ExternalDNS will create a DNS record based on the host specified for the ingress object.
For services ExternalDNS will look for the annotation external-dns.alpha.kubernetes.io/hostname
on the service and use the corresponding value.