How to upload Helm chart to GCP with Pulumi?TypeScript
You can use the Pulumi Kubernetes provider to deploy a Helm chart to a Kubernetes cluster on Google Cloud Platform (GCP). Here's a code that creates a Kubernetes Namespace and deploys a sample Nginx chart from the Bitnami Helm repository.
Firstly, create a Kubernetes namespace where the Helm chart will be deployed:
Then deploy the Helm chart:
- The resources above use the Kubernetes and Helm providers to deploy Helm charts.
- We are creating a new namespace with
k8s.core.v1.Namespacethat will be used to scope our nginx deployment.
- Then, we are deploying an nginx Helm chart using
new k8s.helm.v3.Chart. We specify
bitnamias the repository,
nginxas the chart, and
9.3.2as the version.
Lastly, export the desired outputs:
For complete Pulumi code:
Please note that you need to have a GCP Kubernetes cluster in place and setup kubeconfig correctly for your Pulumi package to have the right access for deployment.