0

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"]
halfer
  • 19,824
  • 17
  • 99
  • 186
xetra11
  • 7,671
  • 14
  • 84
  • 159
  • i use Cloud Run with Custom Domain and i didn't know if Cloud Run can communicate to your Ingress kubernetes. Please check your docker image if Port 80 serve traffic or not. Maybe different port – Nicky Puff Jul 22 '20 at 11:03
  • @NickyPuff I added the info from Dockerfile for the port exposure in the question (bottom) – xetra11 Jul 22 '20 at 11:08
  • ok, i don't experience kubernetes ingress with Cloud Run mixed in the same time. GKE is GKE and Cloud Run is Cloud Run. but if i can suggest you to debug the docker, can you docker pull the image to your local and run the docker -p 8080:80 and visit your browser localhost:8080, if the docker running correctly i think you forgot to set containerPort in Cloud Run to 80. Or, you can use default http-server port and change containerPort Cloud Run to the default http-server port – Nicky Puff Jul 22 '20 at 11:37
  • I don't quite understand your point. As you can see in my question's screenshots from the cloud run revision the container port is set to `80`. I deploy `cloud run deploy` with `--port=80`. The Dockerfile also shows that everything is set to `80`. What is your concern exactly? – xetra11 Jul 22 '20 at 12:16
  • Can you share the yaml file of your service/ingress/deployment, and this one of Knative? – guillaume blaquiere Jul 22 '20 at 16:08

1 Answers1

0

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
  • 42,679
  • 38
  • 138
  • 214
  • Is this "the" ingress for my current cloud run knative service? If so should I be able to open `35.239.55.104:80` (of your example) to see my running webapp? Also I have no indicator that this ingress is somewhat bound to my webapp Cloud Run service to verify. – xetra11 Jul 23 '20 at 12:34
  • You cannot just open the IP address. You also need a `Host` header. That ingress is shared among all Knative services in your cluster. – ahmet alp balkan Jul 26 '20 at 17:21