I faced an issue in our project when calling the GKE Ingress.
For some reason, I have to call an ingress via https://:443/api/v1/test instead of https:///api/v1/test.
in some cases, I found calling https:///api/v1/test would be failed because of “response 404 (backend NotFound), service rules for the path non-existent”
After further investigation, I found when I include port number under the Host Of the Header, the call would be failed (but most other ingress, like Openshift supports the port number under the Host of Header).
In short, below is Working:
curl -k https://sandbox-gke-orion1-weishen.msd.labs.broadcom.net:443/dashboard-api/api/v1/ready -H Host:sandbox-gke-orion1-weishen.msd.labs.broadcom.net
Below is Not Working:
curl -k https://sandbox-gke-orion1-weishen.msd.labs.broadcom.net:443/dashboard-api/api/v1/ready -H Host:sandbox-gke-orion1-weishen.msd.labs.broadcom.net:443
So the question is either if it is possible that GKE Ingress can support the port number under Host of Header like other ingress classes OR if there is a way to rewrite the header info when calling the GKE ingress?