Help Center> Cloud Container Engine> User Guide> New Console> Helms> Deploying an Application Through the Helm Client

Deploying an Application Through the Helm Client

You can directly use the Helm client to deploy applications. If you use the Helm client to deploy applications, version control is not supported. You can use Helm v2 or Helm v3.

Prerequisites

The Kubernetes cluster created on CCE has been connected to kubectl. For details, see Using kubectl.

Installing Helm

Install Helm on CCE nodes.

You can download Helm of a proper version from here. This section uses Helm v3.3.0 as an example.

  1. Download the Helm client on the CCE node.

    wget https://get.helm.sh/helm-v3.3.0-linux-amd64.tar.gz

  2. Decompress the Helm package.

    tar -xzvf helm-v3.3.0-linux-amd64.tar.gz

  3. Copy Helm to the system path, for example, /usr/local/bin/helm.

    mv linux-amd64/helm /usr/local/bin/helm

  4. View the Helm version information.

    helm version
    version.BuildInfo{Version:"v3.3.0", GitCommit:"e29ce2a54e96cd02ccfce88bee4f58bb6e2a28b6", GitTreeState:"clean", GoVersion:"go1.13.4"}

Installing the Helm Chart

If the charts provided by CCE do not meet requirements, download a chart and install it.

You can obtain the required chart in the stable directory on the website, download the chart, and upload it to the node.
  1. Download and decompress the obtained chart. Generally, the chart is in ZIP format.

    unzip chart.zip

  2. Install the Helm chart.

    helm install aerospike/ --generate-name

  3. After the installation is complete, run the helm list command to check the status of the chart releases.

Common Issues

  • The following error message is displayed after the helm version command is run:
    Client:
    &version.Version{SemVer:"v3.3.0",
    GitCommit:"012cb0ac1a1b2f888144ef5a67b8dab6c2d45be6", GitTreeState:"clean"}
    E0718 11:46:10.132102    7023 portforward.go:332] an error occurred
    forwarding 41458 -> 44134: error forwarding port 44134 to pod
    d566b78f997eea6c4b1c0322b34ce8052c6c2001e8edff243647748464cd7919, uid : unable
    to do port forwarding: socat not found.
    Error: cannot connect to Tiller

    The preceding information is displayed because the socat is not installed. Run the following command to install the socat:

    yum install socat -y

  • The following error message is displayed after the Helm version command is run (the socat has been installed):
    test@local:~/k8s/helm/test$ helm version
    Client: &version.Version{SemVer:"v3.3.0", GitCommit:"021cb0ac1a1b2f888144ef5a67b8dab6c2d45be6", GitTreeState:"clean"}
    Error: cannot connect to Tiller

    The Helm chart reads the configuration certificate from the .Kube/config file to communicate with Kubernetes. The preceding error information is displayed because the kubectl configuration is incorrect. In this case, reconnect the cluster to kubectl. For details, see Using kubectl.

  • The storage fails to be created after the cloud storage is connected.

    This issue may be caused by the annotation field in the created PVC. Change the chart name and install the chart again.

  • If kubectl is not properly configured, the following error message is displayed after the helm install command is run:
    [root@prometheus-57046 ~]# helm install prometheus/ --generate-name
    WARNING: This chart is deprecated
    Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version?timeout=32s": dial tcp [::1]:8080: connect: connection refused

    Solution: Configure kubeconfig for the node. For details, see Using kubectl.