This section uses Helm v3.3.0 as an example.
For other versions, visit https://github.com/helm/helm/releases.
wget https://get.helm.sh/helm-v3.3.0-linux-amd64.tar.gz
tar -xzvf helm-v3.3.0-linux-amd64.tar.gz
mv linux-amd64/helm /usr/local/bin/helm
helm version version.BuildInfo{Version:"v3.3.0", GitCommit:"e29ce2a54e96cd02ccfce88bee4f58bb6e2a28b6", GitTreeState:"clean", GoVersion:"go1.13.4"}
You can use Helm to install a chart. Before using Helm, you may need to understand the following concepts to better use Helm:
For more details, see Using Helm.
helm repo add {repo_name} {repo_addr}
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install {release_name} {chart_name} --set key1=val1
For example, to install WordPress, the WordPress chart added in 1 is bitnami/wordpress, the release name is my-wordpress, and mandatory parameters have been configured.
helm install my-wordpress bitnami/wordpress \ --set mariadb.primary.persistence.enabled=true \ --set mariadb.primary.persistence.storageClass=csi-disk \ --set mariadb.primary.persistence.size=10Gi \ --set persistence.enabled=false
helm show values bitnami/wordpress
helm list
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
No match for argument: socat Error: Unable to find a match: socat
The node 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
$ 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 in .Kube/config 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.
This issue may be caused by the annotation field in the created PVC. Change the chart name and install the chart again.
# 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.