0

I have followed the below link to configure Azure AFD and istio. https://medium.com/microsoftazure/automating-istio-installation-on-aks-with-terraform-and-securing-traffic-with-azure-front-door-cb9a3735c399

I was able to access the service if I add a custom hostname in the AFD and use the below virtual service

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: test-virtual-service
spec:
hosts:
- "*"
gateways:

istio-system/istio-ingressgateway
http:

match:

uri:
prefix: "/"
route:

destination:
host: nginx-service.default.svc.cluster.local
port:
number: 8080

But if I add the external hostname to the virtual service host field the service is not loading. My virtual service with hostname set to external dns is as follows.

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: test-virtual-service
spec:
  hosts:
    - "test.external.in"

  gateways:
  - istio-system/istio-ingressgateway
  http:
  - match:

    - uri:
        prefix: "/"

    route:
    - destination:
        host: nginx-service.default.svc.cluster.local
        port:
          number: 8080

Here is my gateway

apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
  name: istio-ingressgateway
  namespace: istio-system
spec:
  selector:
    istio: ingressgateway
  servers:
  - port:
      number: 80
      name: http
      protocol: HTTP
    hosts:
    - '*'
DevIn
  • 1
  • 1

0 Answers0