ahmetb / cloud-run-faq

Unofficial FAQ and everything you've been wondering about Google Cloud Run.
https://cloud.run
Creative Commons Attribution 4.0 International
2.32k stars 124 forks source link

ssh or shell access to cloud run #110

Closed pentium10 closed 3 years ago

ahmetb commented 3 years ago

This does not exist. In the future you’ll be able to run stuff like gotty.

pentium10 commented 3 years ago

@ahmetb it worths documenting that officially this does not exist, but there are ways with reverse shell so get Cloud Run instance to connect to a GCE instance for example on launch and this way a tunnel is happening.

ahmetb commented 3 years ago

Such methods are currently quite hacky. Cloud Run throttles cpu to ~0% when there are no request. So such tunnels would not work easily.

pentium10 commented 3 years ago

I am well aware of that, but you can ping and keep the cluster online, also think of web socket in future will be throttled under them as well?

ahmetb commented 3 years ago

What do you mean by "cluster" here? WebSockets are active requests, so not throttled. But as you can see WS isn't supported currently.

pentium10 commented 3 years ago

Cluster was a wrong word. About WS we will get back to that later. Anyway a lot of people are chasing and one of the most asked and comment things on Cloud Run are how to debug with shell access.

It would be good so Cloud Run engineers should provide a debug mode, and while that is active

ahmetb commented 3 years ago

Anyway a lot of people are chasing and one of the most asked and comment things on Cloud Run are how to debug with shell access.

As someone who monitors ~all Cloud Run questions asked on Twitter and Stack Overflow and here, I would not say "a lot of people". Also this repo isn't for discussing feature requests. :)