百度智能云

All Product Document

          Cloud Container Engine

          HelmTemplate

          Helm template corresponds to the concept of helm chart in the Helm community, which is a packaging format defined by Helm to describe a group of related Kubernetes resources. Helm can help you manage your own set of Kubernetes resources, so that you can quickly define, install and upgrade complex applications.

          Comments: Helm template page provides a template hosting service, which is geographically agnostic.

          Helm Client

          Helm client is a command-line tool that you can download from helm GitHub page.

          Template Market

          Open Helm templates. You can click the template name to enter the template details to view the template introduction, usage and parameters.

          My Template

          Users can upload their own Helm template package and deploy it in the cluster.

          The template uploaded is on display in "Helm template-my template". You can operate the template through the Helm command-line tool.

          It is recommended to make template package preparation through helm client.

          Prepare Template Package

          You can prepare template packages in two ways:

          1.Customize template package. For information on the template package production method and file structure, please see Helm community document:

          2.Use Kubernetes official template package. Visit https://hub.helm.sh/ to get all template packages of the current community.

          Template Package Naming Conventions

          To upload to the Baidu AI Cloud Helm template warehouse, the fields name and version in Chart.yaml of the template package shall conform to the following rules:

          • The length of name cannot exceed 32 characters, and it must start with the lowercase letter and may contain the lowercase letters, numbers and “-“.
          • Complete a major version number, a minor version number, and a revision number in version with the non-negative integers. For the semantics, see the Semantic Version rules. The revision number in the pre-release format is not supported.

          Package Template Package

          It is recommended to operate through helm client.

          Execute helm package ./{name} in the directory where the template package folder is located, where {name} is the template package name, and the operation will generate the corresponding template package tgz file in the directory.

          $ ls -l 
          drwxr-xr-x  6 root root     4096 Feb 15 23:07 mysql 
          $ helm package ./mysql 
          Successfully packaged chart and saved it to: /root/my-charts/mysql-0.15.0.tgz 
          $ ls 
          mysql  mysql-0.15.0.tgz 

          Upload Template Package

          Note: {name} and {version} must be the same as the name and version written in Chart.yaml of the template package. Click the “Upload Template” button on the Helm Template – My Template page, select the template package just packaged, and click the “Import” button to upload the template package to my template.

          Template Package Naming Conventions

          image.png

          the naming format of template package: Template name – Major version number – Minor version number – Revision number.tgz, such as mysql-0.15.0.tgz. You can also upload the template package through helm Client. See Operate Template Warehouse through Helm Client

          Operation by Helm Client

          You can operate the template repository corresponding to "my template" on the helm client. For information on the template repository address, see the repository address button in my template's upper right corner.

          When adding a repository, you need to provide the template repository user name and password. You can create/modify the template repository user name and password in the upper right corner. For users who have created the image repository user name and password, the template repository user name and password are the same as the image repository user name and password.

          image.png

          The command to add a template repository using helm client is as follows:

          $ helm repo add cce-private<template repository address>--username=<username>--password=<password> 

          After you have added the repo successfully, you can view the template package in the template warehouse using the command helm search repo. If you need to upload the template package through the Helm client, you also need to install the helm-push plugin and add the helm push command. For the usage of documentations, see https://github.com/chartmuseum/helm-push. For the operation of other template warehouses supported by the Helm client, see the Helm Community Documentations https://helm.sh/docs/helm/helm_repo/.

          Installation Template

          Click the Install button at the top of the list page and template details to install the latest version of the template by default. If you want to install the historical version, you can select the historical version in the template details-version to install.

          When installing a template, you need to fill in the instance name, target CCE cluster and cluster namespace, and template parameters.

          The instance name convention is as follows:

          • The instance name cannot exceed 32 characters and must start with a lowercase letter and end with a lowercase letter or number. It can contain lowercase letters, arrays and -.
          • The instance name cannot conflict with an existing instance in the target cluster.

          The template parameter text box is filled with the template default parameter values, which can be modified during template installation.

          After the installation, it will automatically jump to the corresponding Helm instance page.

          You can also install the specified Helm template in the corresponding cluster after connecting the cluster through Helm Client. See the following documentation for details.

          Previous
          Namespace Management
          Next
          HelmInstance