Container Service for Kubernetes (ACK) allows you to use Helm to deploy applications from the App Catalog page of the ACK console. Helm in ACK provides extended features and supports official repositories. You can also use the Helm CLI to quickly deploy applications. This topic describes the terms used in Helm and how to use Helm to deploy applications.
Table of contents
Prerequisites
- An ACK managed cluster is created. For more information, see Create an ACK managed cluster.
Tiller is automatically deployed in the cluster when the cluster is created. The Helm CLI is automatically installed on each master node. An Alibaba Cloud chart repository is added to Helm.
- The Kubernetes version of the cluster is 1.8.4 or later. If your cluster does not meet the requirement, update the cluster. For more information, see Update the Kubernetes version of an ACK cluster.
Introduction to Helm
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. 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 developed in Kubernetes. Before you use Helm, we recommend that you familiarize yourself with the following terms and components:
Category | Name | Description |
---|---|---|
Helm terms | Chart | A packaging format used by Helm. Each chart contains the images, dependencies, and resource definitions that are required for running an application. A chart may contain service definitions used 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, if you want to use a MySQL chart to run two databases on a server, you can install the chart twice and generate a release and release name each time you install the chart. | |
Helm components (client/server architecture) | Helm CLI | The Helm client that runs on your on-premises machine or on the master nodes of a Kubernetes cluster. |
Tiller | The server-side component that runs in a Kubernetes cluster. Tiller manages the lifecycles of Kubernetes applications. | |
Repository | A repository is used to store charts. The Helm client can access the index file and packaged charts in a chart repository over HTTP. |
Use the ACK console to deploy applications with Helm
- Log on to the ACK console.
- In the left-side navigation pane, choose .
- On the App Catalog tab, select and click a chart to go to the details page. In this example, ack-wordpress-sample is used.
- Click Deploy in the upper-right corner of the page. In the Deploy panel, select a cluster and namespace, and click Next.
- On the Parameters wizard page, configure the parameters and click OK. In this example, a persistent volume claim (PVC) is specified to bind a dynamically provisioned disk volume. For more information, see Use a dynamically provisioned disk volume.Note You must first provision a disk as a persistent volume (PV). The capacity of the PV cannot be less than the capacity specified in the PVC.
- In the left-side navigation pane, choose .
- In the Service list, you can find the Service created for the application and the corresponding external endpoints for HTTP and HTTPS access. Click an external endpoint to access the WordPress application. Note Before you access the external endpoint, make sure that the port of the endpoint is added to the security group.
Use the Helm CLI to deploy applications
If you use the Helm CLI to deploy applications, you can log on to the Kubernetes cluster through SSH. For more information, see Use SSH to connect to the master nodes of a dedicated Kubernetes cluster. You can also configure the kubectl and Helm CLI on an on-premises machine. The Helm CLI will automatically add and configure a repository. You can also run the following command to add a repository:
helm repo add aliyunhub https://aliacs-app-catalog.oss-cn-hangzhou.aliyuncs.com/charts-incubator/
In this example, the Helm CLI and kubectl are installed and configured on an on-premises machine, and then an Apache Spark-based WordPress application is deployed.
- Install and configure the Helm CLI and kubectl.
- Use Helm to deploy the WordPress application.
Use a third-party chart repository
In addition to the built-in chart repositories provided by Alibaba Cloud, you can also use third-party chart repositories if your cluster has Internet access.
Run the following command to add a third-party chart repository to Helm: For more information about Helm commands, see Helm documentation.
helm repo add Repository name Repository URL
helm repo update
References
The wide adoption of Helm encourages a growing number of software vendors to provide high-quality charts. If you require more charts, visit https://kubeapps.com/
.