This topic introduces the basic concepts of Helm and describes how to use Helm to deploy an Apache Spark-based WordPress application in a Container Service for Kubernetes (ACK) cluster.
Prerequisites
- An ACK cluster is created before you use Helm to deploy an application. For more information,
see Create an ACK managed cluster.
Tiller is automatically deployed to the cluster when the Kubernetes cluster is created. The Helm CLI is automatically installed on each master node. An Alibaba Cloud chart repository is added to Helm.
- A Kubernetes version that supports Helm is used.
Only Kubernetes 1.8.4 and later support Helm. If the Kubernetes version of your cluster is 1.8.1, you can upgrade the cluster on the Clusters page of the ACK console.
Background information
Application management is the most challenging task in Kubernetes. The Helm project provides a unified method to package software and manage software versions. You can use Helm to simplify application distribution and deployment. App Catalog is integrated with Helm in the ACK console and provides extended features based on Helm. App Catalog also supports Alibaba Cloud chart repositories to help you accelerate application deployments. You can deploy applications in the ACK console or by using the Helm CLI.
Basic terms
Helm is an open source project initiated by Deis. Helm can be used to simplify the deployment and management of Kubernetes applications.
Helm serves as a package manager for Kubernetes and allows you to find, share, and use applications built by Kubernetes. Before you use Helm, you must familiarize yourself with the following basic terms:
- Chart: a packaging format used by Helm. Each chart contains the images, dependencies, and resource definitions that are required to run an application. A chart may contain service definitions in a Kubernetes cluster. A Helm chart is similar to a Homebrew formula, an Advanced Package Tool (APT) dpkg, or a Yum rpm.
- Release: an instance of a chart that runs in a Kubernetes cluster. A chart can be installed multiple times in a Kubernetes cluster. After a chart is installed, a new release is created. For example, you can install a MySQL chart. If you want to run two databases in your cluster, you can install the MySQL chart twice. Each time a chart is installed, a release is created with a different name.
- Repository: the storage of charts. Charts are published and stored in repositories.
Helm components
Helm uses a client-server architecture and consists of the following components:
- The Helm CLI is the Helm client that runs on your on-premises machine or on the master nodes of a Kubernetes cluster.
- Tiller is the server-side component and runs in a Kubernetes cluster. Tiller manages the lifecycles of Kubernetes applications.
- A repository is used to store charts. The Helm client can access the index file and packaged charts in a chart repository over HTTP.
Deploy an application in the ACK console
Deploy an application by using the Helm CLI
After Helm CLI is automatically installed in the ACK cluster and the required chart repository is added to Helm, you can log on to the cluster by using SSH. Then, you can deploy applications by using Helm CLI. For more information, see Connect to the master nodes of a dedicated Kubernetes cluster by using SSH. You can also install and configure the Helm CLI and kubectl on your on-premises machine.
In this example, the Helm CLI and kubectl are installed and configured on your on-premises machine, and then an Apache Spark-based WordPress application is deployed.
Use a third-party chart repository
You can use the default Alibaba Cloud chart repository. If a third-party chart repository is accessible from your cluster, you can also use the third-party chart repository. Run the following command to add a third-party chart repository to Helm:
helm repo add Repository name Repository URL
helm repo update
For more information about Helm commands, see Helm documentation.
References
Helm contributes to the development of Kubernetes. A growing number of software suppliers,
such as Bitnami, have provided high-quality charts. For more information about available
charts, visit https://kubeapps.com/
.