I'm currently working on a project using Gateway API on Google Kubernetes Engine (GKE) with Istio as my service mesh. My setup involves using Google's managed Gateway API, which allows me to handle external traffic via a global Layer 7 load balancer. However, I'm facing a challenge when it comes to securing the traffic between the external Gateway and my backend pods, as these pods might not support HTTPS natively. While Istio's mTLS secures communication between pods, it doesn't apply automatically to traffic flowing from the external Gateway to the backend pods when the Gateway is outside the mesh. I need some advice on how to effectively manage this. What strategies can I use to either terminate or offload TLS close to my pods, or how can I establish a secure channel to avoid plaintext traffic within the cluster? Is there a way to handle TLS termination for the connection between the Gateway API and the pods using the Istio sidecar?
2 Answers
You might want to look into setting up a `TLSRoute` in `Passthrough` mode. This should help manage the encrypted connections. According to the documentation, by combining `Terminate TLS` mode with `BackendTLSPolicy` in your HTTPRoute, you can achieve a scenario where the connection is terminated and then re-encrypted at the Gateway.
I get where you’re coming from! The external Gateway API will indeed handle the encryption for incoming connections. The tricky part is creating a second HTTPS connection to your backend pods that might not support HTTPS by default. Typically, you’d set the `tls.mode` to SIMPLE with a certificate, but if your pod can’t handle TLS termination, this becomes a challenge. Have you considered using an Envoy Proxy in front of your backend services? That could allow you to manage the TLS connections without putting a strain on your pods.

Related Questions
How to Build a Custom GPT Journalist That Posts Directly to WordPress
Cloudflare Origin SSL Certificate Setup Guide
How To Effectively Monetize A Site With Ads