How to Deploy Helm Chart to Google Kubernetes Engine
Helm is described as a “package manager for Kubernetes”, it is a tool for managing applications that run in the Kubernetes cluster manager while also ensuring you don’t have to manage Kubernetes manifests by hand.
Helm provides a set of operations that are useful for managing applications, such as: inspect, install, upgrade, rollback, delete.
In this tutorial, we would deploy a Helm Chart to a Google Kubernetes Engine Cluster.
Google Kubernetes Engine (GKE) provides a managed environment for deploying, managing, and scaling your containerized applications using Google infrastructure. The Kubernetes Engine environment consists of multiple machines (specifically Google Compute Engine instances) grouped together to form a container cluster.
- Create a Google Cloud Platform (GCP) project, or use an existing one.
For an overview of Kubernetes concepts, see the Kubernetes documentation.
Setup a Google Kubernetes Engine cluster
To set up a GKE cluster, click here OR navigate as follows on the GCP Console:
Kubernetes Engine > Clusters > Create Cluster
(name: my-cluster, leave other fields as is)
If you are more comfortable using the gcloud tool, the equivalent command for the above is:
$ gcloud container clusters create my-cluster
Helm provides the same basic feature set as many of the package managers you may already be familiar with, such as Debian’s apt, or Python’s pip. Helm can: Install software. Automatically install software dependencies. Upgrade software. Configure software deployments. Fetch software packages from repositories
Helm charts are packages of pre-configured Kubernetes resources that are ready to deploy. It consists of metadata that describes the application, plus the infrastructure needed to operate it in terms of the standard Kubernetes primitives. Each chart references one or more (typically Docker-compatible) container images that contain the application code to be run.
To install Helm v3.X, run the following commands, or check out the docs:
Installing a Chart
You would install a WordPress application using its Helm Chart. You can search for the WordPress Helm Chart and select bitnami/wordpress.
This sets up a WordPress deployment on your Kubernetes cluster using the Helm package manager, it also packages the Bitnami MariaDB chart which is required for bootstrapping a MariaDB deployment for the database requirements of the WordPress application.
Note that your installed WordPress application name would be in form of *<application_name>-wordpress* .
To get the IP address of your deployed application, you can run the command:
$ kubectl get service myblog-wordpress
You can also navigate to Kubernetes Engine > Services & Ingress and see how your application is doing. As seen below.
You can also visit the External IP or Login to *<IP>/admin* with the username and password used earlier.
To uninstall an application, you need to run the following command:
$ helm delete myblog
Note that every Kubernetes resource that is tied to this release will be removed.