Reputation: 1434
I deployed flask application in GCP compute engine. It is exposed at 5000 port. When I tried to do curl from vm, curl "localhost:5000/health"
, I am getting response "service up". But when I tried accessing through public IP, I am not able to access. I have created network firewall rule allowing both http & https traffic and for all the ports and for all IP (0.0.0.0/0).
Please let me know, if I am missing anything here.
Upvotes: 0
Views: 973
Reputation: 1420
Posting this answer based on the solution that was provided by @Rakesh.
Issue got resolved by changing the local host in the flask code to 0.0.0.0
.
So the final configuration looks as follows:
app.run(host='0.0.0.0',debug=True,port=5000)
Upvotes: 1