0

I'm trying to deploy an SMTP Server on google cloud run and so far I haven't been able to figure out how to attach a TCP/UDP Load Balancer to the back end.

Is there a way for my Cloud Run application to listen publicly on port 25?

0

2 Answers 2

0

Due to the restrictions of the cloud run platform it is difficult to deploy an SMTP server on Google Cloud Run.Although Port 25 is limited on Google Cloud Run, it is not supported for listening on it because of its link to issues with email misuse and abuse.

However Google Cloud does not place any restrictions on traffic sent to external destination IP addresses using destination TCP ports 587 or 465.Refer to this official GCP documentation on this.

Please refer to this document to know how to attach a TCP/UDP Load Balancer to the back end.

6
  • That document on TCP/UDP doesn't seem to apply to cloud run. I currently have this working on kubernetes, but am moving a bunch of services to cloud run since kubernetes frequently forces us to update creating extra admin headaches. As far as abuse goes theres no issue in receiving on port 25 which is currently our only use case since this service only receives email. Commented Jul 1 at 19:17
  • In Kubernetes, you typically use a combination of Kubernetes services and an ingress controller which supports TCP/UDP load balancing to attach a TCP/UDP load balancer to the backend. Commented Jul 2 at 12:07
  • You can kindly follow the below steps: 1. Create a kubernetes service 2. Deploy your application 3. Setup ingress controller for TCP/UDP load balancing 4. Deploy and configure Ingress controller 5. Access your application Refer to ingress controller and kubernetes service for more details. Commented Jul 2 at 12:09
  • I already have this working on kubernetes, but i'm trying to move away from kubernetes onto cloud run. The only solution i'm looking for would be specifically if it's possible to attach port 25 to a backend in Cloud Run. Commented Jul 4 at 3:53
  • Regarding your question specifically attaching port 25 to a backend in cloud run , it's important to note that cloud run does not allow direct attachment of port 25 due to its serverless nature. However cloud run is a managed compute platform that automatically scales your containerized applications. Commented Jul 4 at 11:31
0

As far as I can tell, Cloud Run is specifically designed for web services and they don't seem to support ingress for ports other than 80/443.

I will continue running my SMTP Server on kubernetes for now.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .