Hi,I have stood up a simple streamlit server on a single VM instance and I can correctly access it via myip:8501. I now want to set things up so traffic to myip:80 and myip:443 is handled by myip:8501. This seems like it should be very simple but I am getting stuck. I see that there is a way to set up a load balancer to forward traffic to VM instance groups, but, I do not want to set up instance groups yet, since traffic will be minimal.
Can someone instruct me how to do this, either using the console or gcloud? This is blocking me from moving forward, so any help will be much appreciated!
FRed
Hi
Can you answer the following questions below.
- Is there only 1 service listening to port 80 and 443?
- Is your main goal is for myip:8501 to access service listening to port 80 and 443?
Please let us know the answer for further understanding.
Hi,
Port forwarding is not available in GCP, but I believe you can set up port forwarding inside your server. Since you mentioned you are using a streamlit server, here is their recommendation in this kind of scenario, you can check both of these links[1][2]. I believe they also have community support that you can use to ask this concern.
However, GCP has a feature of Protocol Forwarding. You may check this overview[3] to understand more of this feature.
[1]https://docs.streamlit.io/knowledge-base/deploy/deploy-streamlit-domain-port-80
[2]https://discuss.streamlit.io/t/port-forwarding-issues/2434
[3]https://cloud.google.com/load-balancing/docs/protocol-forwarding#forwarding-rules
1 Like