Forwarding All Traffic from Global External IP to a Domain on GCP

1/15/2022

I have an Autopilot GKE cluster set up. There is an Ingress which is an entry point to the app deployed in the cluster. I managed to configure SSL and HTTP -> HTTPS redirection with ease.

I also configured Cloud DNS that resolves my domain name to the cluster's IP (global static IP, let's name it global-front-app-ip).

This works without any problems. I'm able to access the app with the domain I own. My setup is very simillar to the one described in this article.

What I'm trying to achieve now is to redirect all the clients that try to access the app with LB IP global-front-app-ip to the domain name (http://global-front-app-ip -> http://my-domain.com).

I played with LB forwarding rules and Cloud Armor but I haven't found a working solution.

-- mateusz
google-cloud-platform
kubernetes

0 Answers