Helm Template
Helm Template corresponds to the Helm Chart concept in the Helm community, is a packaging format defined by Helm to describe a set of related Kubernetes resources. Helm helps you manage custom Kubernetes resource collections, enabling rapid definition, installation, and dilatation of complex applications.
Note: The Helm template page offers template hosting services that are not region-specific.
Helm client
The helm client is a command line interface that can be downloaded from the Helm Github Page.
Template market
Publicly accessible Helm templates. Click a template name to view its details, including descriptions, usage instructions, and parameters.
My templates
Users can upload their own Helm template packages and deploy them in clusters.
Uploaded templates will appear under Helm Templates - My Templates and can be managed using the Helm command-line interface.
It is recommended to use the [Helm Client](#Helm client) to prepare template packages.
Preparing template packages
You can prepare template packages using the following two methods:
- Create customized template packages. For details on creation methods and file structures, refer to the Helm community documentation:
- Use official Kubernetes template packages. Visit https://hub.helm.sh/ to access all current community template packages.
Template package naming rules
To upload to the Baidu AI Cloud helm template repository, the name and version fields in the Chart.yaml file within the template package must comply with the following rules:
- The
namemust not exceed 32 characters, must start with a lowercase letter, and can contain lowercase letters, numbers and hyphens (-). - The
versionfield (major version No., minor version No. and reversion No.) must contain only non-negative integers. It follows the Semantic Versioning rules and does not support the reversion No. of pre-release formats.
Package template packages
It is recommended to use the [Helm Client](#Helm client).
In the directory where the template package folder is located, execute the command helm package ./{name}, where <name> is the template package name. This operation will generate a corresponding tgz template package file in the directory.
1$ ls -l
2drwxr-xr-x 6 root root 4096 Feb 15 23:07 mysql
3$ helm package ./mysql
4Successfully packaged chart and saved it to: /root/my-charts/mysql-0.15.0.tgz
5$ ls
6mysql mysql-0.15.0.tgz
Upload template packages
On the Helm Templates - My Templates page, click the Upload Template button, select the packaged template, and click the Import button to upload it to My Templates.
You can also upload template packages using the helm client. For details, refer to [Manage Template Repositories with Helm Client](#Using Helm Client to Operate Template Repository).
Manage my templates with helm client
You can manage the template repository corresponding to My Templates using the [Helm Client](#Helm client); the repository address is available via the Repository Address button in the upper right corner of the My Templates page.
When adding a repository, provide the template repository username and password, which can be created or updated via the top-right corner. For users who already have a username and password for the image registry, the template repository credentials will be the same as the image repository credentials.
The command to add a template repository using the helm client is as follows:
1$ helm repo add cce-private <template repository address> --username=<username> --password=<password>
After adding the repo, you can view template packages in the repository using the helm search repo command.
To upload template packages via the helm client, you need to install the helm-push plugin to enable the helm push command. For usage documentation, refer tohttps://github.com/chartmuseum/helm-push.
For other template repository operations supported by the helm client, refer to the helm community documentationhttps://helm.sh/docs/helm/helm_repo/.
Install templates
Click the Install button on the template list page or at the top of the template details page to install the latest version of the template by default. To install a previous version, select it from the Versions section on the template details page.
During template installation, you must input the instance name, target CCE cluster, cluster namespace, and template parameters.
The specification for instance names is as follows:
- The instance name must not exceed 32 characters, begin with a lowercase letter, end with a lowercase letter or number, and can include lowercase letters, numbers, and hyphens (-).
- It must not conflict with other existing instances in the target cluster.
Default template parameter values are pre-filled in the template parameter text box and can be adjusted during installation.
After installation, you will be redirected automatically to the relevant Helm instance page.
!
You can also install specified helm templates in a cluster after connecting to the cluster via the [Helm Client](#Helm client). For details, refer to the following documentation:
- [Connect to Clusters via Helm Client](CCE/Operation guide/Helm Management/Helm Instance.md#Connect to Clusters via Helm Client)
- helm Install
