Getting Started¶
In this guide you will learn how to deploy a simple Hello World image to Google Cloud Run using Helmless. Read what is Helmless first if you want to understand how it works. See the architecture for more information on how to adopt it to other cloud providers.
Deploying from a CI/CD pipeline is covered in a later guide.
Prerequisites¶
- A Google Cloud account
- The Google Cloud CLI
- The Helm CLI
Make sure you have a Google Cloud project ready. If you don't have one yet, create a new one using the Google Cloud Console.
Deploying Your First Helmless Service¶
First login to Google Cloud and set the project and region you want to deploy the service to. (1)
gcloud auth login
gcloud config set project <your-project-id>
gcloud config set run/region <your-region> # e.g. europe-west1
After that create a helmless/values.yaml
file, with the following content: (2)
mkdir -p helmless
cat <<EOF > helmless/values.yaml
# yaml-language-server: \$schema=https://raw.githubusercontent.com/helmless/helmless/main/charts/cloudrun/service/values.schema.json
name: helmless-service
region: $(gcloud config get run/region)
project: $(gcloud config get project)
image: 'us-docker.pkg.dev/cloudrun/container/hello'
env:
COLOR: 'blue'
EOF
Full Chart Specification
You can find the full chart specification and all supported configuration options in the chart schema.
Then run helm template
to template the Helm chart into a Cloud Run service manifest. (3)
helm template oci://ghcr.io/helmless/google-cloudrun-service \
-f helmless/values.yaml \
> helmless/google-cloudrun-service.manifest.yaml
Now you only need to deploy the templated Cloud Run service manifest to Google Cloud Run using the Google Cloud CLI.
Tada! 🥳
You can now see your Cloud Run service in action when starting the Cloud Run proxy and navigating to http://localhost:8080
. (4)
Now to see something change, update the env.COLOR
value in your helmless/values.yaml
file and re-run the helm template
and gcloud run services replace
commands.
- Setting the project and region is only required when deploying locally. When deploying from a CI/CD pipeline the project and region are automatically extracted from the rendered manifest.
- Helmless uses the Helm pattern of a
values.yaml
file to configure the service. You can store this anywhere in your repository, but for this example we will use thehelmless
directory. helm template
is the command to template a Helm chart and in Helmless used to create create a cloud provider specific service manifest.- By default Cloud Run services are not publicly accessible, so you need to start the Cloud Run proxy to access the service locally.
Cleaning up¶
You can delete the service using the gcloud run services delete
command.
Next Steps¶
From here you can head back to the overview to learn more about Helmless for Google Cloud Run or jump to the next guide to learn how to deploy from a CI/CD pipeline using Github Actions.
-
What is Helmless?
Learn the core concepts and understand how Helmless simplifies serverless deployments
-
How does it work?
Understand the architecture, technical details behind Helmless, and how to extended it to other platforms.
-
Deploy Your First Service
Get hands-on experience deploying to Google Cloud Run with Helmless
-
Examples
Explore real-world examples and sample configurations