istio / istio.io

Source for the istio.io site
https://istio.io/
Apache License 2.0
762 stars 1.52k forks source link

More details about the Manual deployment with the Gateway API? #14010

Open mathieu-benoit opened 11 months ago

mathieu-benoit commented 11 months ago

In this doc: https://istio.io/latest/docs/tasks/traffic-management/ingress/gateway-api/#manual-deployment, it would be really great to elaborate on the details to make this working:

On a concrete example, I'm with GKE, should I have something like this with 2 Gateways?

istio-gateway   gke-gateway                gke-l7-gxlb   xx.xx.xx.xx                                                 True         27m
istio-gateway   istio-gateway              istio         istio-ingressgateway.istio-gateway.svc.cluster.local:80         Unknown      104s

But then to which one my HTTPRoute should be attached?

mathieu-benoit commented 11 months ago

So I think I was able to make it working, here's how:

Manually deploy the Istio ingress gateway:

istio-gateway   service/istio-ingressgateway   ClusterIP
istio-gateway   deployment.apps/istio-ingressgateway

Deploy 2 Gateways:

istio-gateway   gke-gateway                gke-l7-gxlb   xx.xx.xx.xx
istio-gateway   istio-gateway              istio         istio-ingressgateway.istio-gateway.svc.cluster.local:80

And then add an HTTPRoute to bind the 2 Gateways:

apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
  name: istio-ingressgateway
  namespace: istio-gateway
spec:
  parentRefs:
  - kind: Gateway
    name: gke-gateway
    namespace: istio-gateway
  rules:
  - backendRefs:
    - kind: Service
      name: istio-ingressgateway
      port: 80

Finally, the Services that we want to add in our Mesh via the Gateway API need to be bound to the istio-gateway Gateway via an HTTPRoute:

cat << EOF | kubectl apply -f -
apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
  name: frontend
  namespace: onlineboutique
spec:
  parentRefs:
  - kind: Gateway
    name: istio-gateway
    namespace: gke-gateway
  rules:
  - backendRefs:
    - kind: Service
      name: frontend
      port: 80
EOF
dkravetz commented 1 month ago

I am trying to do the same, but the documentation is still unclear.

@mathieu-benoit could you please provide the manifests for the Gateway?

mathieu-benoit commented 1 month ago

Here you are @dkravetz: https://medium.com/p/9d64c7009cd.