GCP Ingress can't find my Kubernetes Service port anymore after I migrated the app to Google Cloud Run "gke"

7/22/2020

I recently successfully deployed my Vue.JS webapp to Cloud Run. Beforehand the webapp was deployed by a Kubernetes Deployment and Service. I also had an Ingress running that redirect my http requests to that service. Now Cloud Run takes over the work.

Unfortunately the new Cloud Run driven Knative "Service" does not seem to work anymore.

My Ingress is showing me the following error message:

enter image description here (Where importer-controlroom is my application's name)

The error message is not cromprehensible to me. I hereby try to provide you with some more information with what you maybe be able to help me out with this issue.

This is current list of resources that have been created. I especially was looking at the importer-controlroom-frontend External Name. I somewhat think this is the Service that replaced the old one?

enter image description here

Because I used it's name in my Ingress Rules to map it to a domain as you can see here:

enter image description here

The error message in the Ingress says:

could not find port "80" in service "dev/importer-controlroom-frontend"

However the Cloud Run revision shows that port 80 is being provided:

enter image description here

A friend of mine redirect me to this article: https://cloud.google.com/solutions/integrating-https-load-balancing-with-istio-and-cloud-run-for-anthos-deployed-on-gke?hl=de#handling_health_check_requests

Unfortunately I have no idea what it is talking about. True thing is that we are using Istio but I did not configure it and have a very hard time getting my head around it for this particular case.

INFO_1

Dockerfile contains:

EXPOSE 80
CMD [ "http-server", "dist", "-p 80"]
-- xetra11
google-cloud-run
knative
kubernetes
kubernetes-ingress

1 Answer

7/22/2020

Cloud Run for Anthos apps do not work with a GKE Ingress.

Knative services are exposed through a public gateway service called istio-ingress on the gke-system namespace:

$ kubectl get svc -n gke-system
NAME                    TYPE           CLUSTER-IP    EXTERNAL-IP
istio-ingress           LoadBalancer   10.4.10.33    35.239.55.104

Domain names etc work very differently on Cloud Run for Anthos so make sure to read the docs on that.

-- ahmet alp balkan
Source: StackOverflow