Deploying an Application Through the Helm v2 Client

Prerequisites

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

Installing Helm v2

This section uses Helm v2.17.0 as an example.

For other versions, visit https://github.com/helm/helm/releases.

  1. Download the Helm client from the VM connected to the cluster.

    wget https://get.helm.sh/helm-v2.17.0-linux-amd64.tar.gz

  2. Decompress the Helm package.

    tar -xzvf helm-v2.17.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. RBAC is enabled on the Kubernetes API server. Create the service account name tiller for the tiller and assign cluster-admin, a system ClusterRole, to the tiller. Create a tiller resource account as follows:

    vim tiller-rbac.yaml
    apiVersion: v1
    kind: ServiceAccount
    metadata:
      name: tiller
      namespace: kube-system
    ---
    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRoleBinding
    metadata:
      name: tiller
    roleRef:
      apiGroup: rbac.authorization.k8s.io
      kind: ClusterRole
      name: cluster-admin
    subjects:
      - kind: ServiceAccount
        name: tiller
        namespace: kube-system

  5. Deploy the tiller resource account.

    kubectl apply -f tiller-rbac.yaml

  6. Initialize the Helm and deploy the pod of tiller.

    helm init --service-account tiller --skip-refresh

  7. Query the status.

    kubectl get pod -n kube-system -l app=helm

    Command output:

    NAME                             READY   STATUS    RESTARTS   AGE
    tiller-deploy-7b56c8dfb7-fxk5g   1/1     Running   1          23h

  8. Query the Helm version.

    # helm version
    Client: &version.Version{SemVer:"v2.17.0", GitCommit:"a690bad98af45b015bd3da1a41f6218b1a451dbe", GitTreeState:"clean"}
    Server: &version.Version{SemVer:"v2.17.0", GitCommit:"a690bad98af45b015bd3da1a41f6218b1a451dbe", GitTreeState:"clean"}

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 this 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/
  3. After the installation is complete, run the helm list command to check the status of the chart releases.

Common Issues