Deploying Applications to Google Cloud Run
Learn how to deploy applications to Google Cloud Run.
Choosing a platform
We might also need to choose the platform. As we’ve already mentioned, Cloud Run is based on Knative, which can run on any Kubernetes cluster. Similarly, GCloud allows us to deploy serverless applications almost anywhere. We can choose between managed, gke, and kubernetes. The managed platform is Cloud Run, which we’re exploring right now.
Finally, we’ll have to specify the Google Cloud project in which we’ll run the application.
Note: We could specify quite a few other things. But we’ll let you explore them on your own after you finish with this section, if you still feel that Google Cloud Run might be the right solution for some of your use cases.
Deploying the application
With all that in mind, here is the command we’ll execute.
After approximately one minute, our application has been deployed and is available. That’s all it took. A single command, with a few simple arguments, deployed our application packaged as a container image. Let’s confirm that by outputting all the applications managed by Cloud Run inside that project.
The output is as follows.
Similarly, we can retrieve all the revisions of an application.
The output is as follows.
There’s not much to look at since we only deployed one revision of the application. The revisions will start piling up if we start deploying new releases.
Finally, let’s ...