Quickstart: Deploy to Google Cloud Run¶
This tutorial will get you up and running with Helmless by deploying a simple "Hello World" container to Google Cloud Run.
Time to complete
This tutorial will take approximately 5 minutes to complete.
Prerequisites¶
You'll need:
- Google Cloud CLI installed
- Helm CLI installed
- A Google Cloud account with billing enabled
Step 1: Set Up Your Environment¶
-
Login to Google Cloud:
-
Set your project and region:
Step 2: Create Your Service Configuration¶
-
Create a new directory for your service:
-
Create a
helmless/values.yaml
file:cat <<EOF > helmless/values.yaml # yaml-language-server: \$schema=https://raw.githubusercontent.com/helmless/helmless/main/charts/cloudrun/service/values.schema.json name: hello-helmless region: $(gcloud config get run/region) project: $(gcloud config get project) image: 'us-docker.pkg.dev/cloudrun/container/hello' env: COLOR: 'blue' EOF
This is your service configuration. It defines everything about your service that would normally be defined via the GCP Console or Terraform.
Helmless Chart Schema
You can find the full schema for the Google Cloud Run Service Helmless chart here.
Step 3: Generate the Cloud Run Configuration¶
Run this command to template your service:
helm template oci://ghcr.io/helmless/google-cloudrun-service \
-f helmless/values.yaml \
> helmless/service.yaml
This will generate a service.yaml
manifest in the GCP native format and will be used to deploy your service using the CLI.
Step 4: Deploy Your Service¶
Deploy to Cloud Run:
That's it! Your service is now deployed to Google Cloud Run.
Step 5: Test Your Service¶
- Start the Cloud Run proxy:
- Open http://localhost:8080 in your browser
You should see a blue-themed "Hello World" page! 🎉
Try Something New¶
Change the color of your service:
-
Update
COLOR
inhelmless/values.yaml
: -
Re-run the template and deploy commands:
-
Refresh your browser to see the new color!
Clean Up¶
When you're done, delete the service: