Quickstart: Deploy to Google Cloud Run¶
version: 0.3.0 repository: oci://ghcr.io/helmless alias: service - name: google-cloudrun-job version: 0.3.0 repository: oci://ghcr.io/helmless alias: job
Prerequisites¶
You'll need:
- Google Cloud CLI installed
- Helm CLI installed
- A Google Cloud account with billing enabled and the
roles/run.admin
role
Your First Helmless Application¶
Step 1: Set Up Your Environment¶
-
Login to Google Cloud:
-
Set your project and region:
Step 2: Create Your Application Chart¶
Create a new directory for your service and initialize a Helm chart:
helm create helmless && cd helmless
rm -rf helmless/templates/* && rm -f helmless/values.yaml
echo "output" >> .gitignore
Step 3: Add the Helmless Charts¶
You now need to add the Helmless charts as dependencies to your application chart.
- Add the Helmless chart to your service:
- Run
helm dependency update
to update the dependencies:
Step 4: Configure Your Service¶
Now you can configure your service using the values.yaml
file.
Google Cloud Run Service Schema
You can find the full schema for the Google Cloud Run Service here.
Step 5: Template the Cloud Run Service Manifest¶
Next, you can template the Cloud Run Service manifest using the helm template
command.
This will generate a service.yaml
manifest in the output
directory that can be used to deploy your service using the gcloud
CLI.
Step 6: Deploy Your Service¶
You can now deploy your service using the gcloud
CLI.
That's it! Your service is now deployed to Google Cloud Run.
Step 7: Test Your Service¶
- Start the Cloud Run proxy:
- Open http://localhost:8080 in your browser
You should see a blue-themed "Hello World" page! 🎉
Step 8: Add a Second Environment¶
Let's simulate a development environment by adding a values.dev.yaml
file.
-
Create a
values.dev.yaml
file: -
Re-run the template with the new values:
-
Deploy the new manifest:
-
Refresh your browser to see the new color!
Clean Up¶
When you're done, delete the service:
What's Next?¶
-
CI/CD with Github Actions
Learn how to deploy your Helmless chart using Github Actions.
-
Cloud Run Schemas
See the full schema for the Google Cloud Run Service and Job.
-
Examples
See an example of a Helmless chart for Google Cloud Run.
-
Architecture
Learn more about Helmless and how it works.