Use K8s Ingress with gateway?


#1

in the helm values file there is a setting global.k8sIngressSelector with the description.

Gateway used for legacy k8s Ingress resources. By default it is
using ‘istio:ingress’, to match 0.8 config. It requires that
ingress.enabled is set to true. You can also set it
to ingressgateway, or any other gateway you define in the ‘gateway’
section.

does that mean if i set global.k8sIngressSelector=ingressgateway then normal ingress objects will work on the istio gateway?
I tried it and it is not working for me.

kind: Deployment
apiVersion: apps/v1
metadata:
  name: echo
spec:
  replicas: 1
  selector:
    matchLabels:
      app: echo
  template:
    metadata:
      labels:
        app: echo
    spec:
      containers:
        - name: echo
          image: mendhak/http-https-echo
          ports:
            - containerPort: 80
---
kind: Service
apiVersion: v1
metadata:
  name: echo
spec:
  type: ClusterIP
  selector:
    app: echo
  ports:
    - port: 80
      name: http

this works

apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: gateway
spec:
  selector:
    istio: ingressgateway
  servers:
    - port:
        number: 80
        name: http
        protocol: HTTP
      hosts:
        - '*.dev.example.com'
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: echo
spec:
  hosts:
    - echo.dev.example.com
  gateways:
    - gateway
  http:
    - route:
        - destination:
            host: echo

this doesnt

kind: Ingress
apiVersion: extensions/v1beta1
metadata:
  name: echo
spec:
  rules:
    - host: echo.dev.example.com
      http:
        paths:
          - backend:
              serviceName: echo
              servicePort: 80