Is it posible to expose 5001 (HTTP) and 5672 (TCP) ports in a Cloud Run Service?

我的梦境 提交于 2020-12-15 02:55:39

问题


I am setting up a solution in Google Cloud. I need a RabbitMQ queue broker and a WebAPI developed in .NET Core 2.2. The idea is for the WebAPI to connect to RabbitMQ to receive messages.

I have mounted RabbitMQ with GKE in a cluster of kubernetes with RabbitMQ Cluster, obtained in Marketplace. I have mounted the WebAPI in Cloud Run. Both components are raised in a standard way, without any particularity for publication.

The WebAPI uses port 5001 for HTTP traffic, and apparently the listener that subscribes to RabbitMQ to receive messages uses port 5672.

The problem is that uploading the WebAPI to Cloud Run doesn't work, apparently because Cloud Run only exposes one port for HTTP traffic and therefore the other port, 5672, is blocked.

By mounting the same WebAPI in a container on kubernetes, it does expose port 5001 and 5672 and works fine.

Can a WebAPI be published to Cloud Run that, in addition to exposing port 5001 for HTTP traffic, also exposes port 5672 (in this case to open a TCP connection) and thus be able to connect to RabbitMQ?


回答1:


No.

Cloud Run (fully managed) always exposes services a single port (on :443) over HTTPS.



来源:https://stackoverflow.com/questions/61893589/is-it-posible-to-expose-5001-http-and-5672-tcp-ports-in-a-cloud-run-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!