Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Cloud Container Engine/ User Guide (Ankara Region)/ Helm Chart/ Deploying an Application Through the Helm v2 Client

Deploying an Application Through the Helm v2 Client

Updated on 2024-12-04 GMT+08:00

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

  • The following error message is displayed after the Helm version command is run:
    Client:
    &version.Version{SemVer:"v2.17.0",
    GitCommit:"a690bad98af45b015bd3da1a41f6218b1a451dbe", 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
  • When you run the yum install socat –y command on a node running EulerOS 2.9, the following error message is displayed:

    No match for argument: socat

    Error: Unable to find a match: socat

    The image does not contain socat. In this case, manually download the RPM chart and run the following command to install it (replace the RPM chart name with the actual one):

    rpm -i socat-1.7.3.2-8.oe1.x86_64.rpm
  • When the socat has been installed and the following error message is displayed after the helm version command is run:
    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 indicates that the kubectl configuration is incorrect. In this case, reconnect the cluster to kubectl. For details, see Using kubectl.

  • Storage fails to be created after you have connected to cloud storage services.

    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.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback