We can think of Helm as Maven/NPM under Kubernetes. Pip under Python, yum on Linux, Helm is a package manager for kubernetes developed by Deis ( https://deis.com/ )
The package is called a Chart, and a Chart is a directory (generally, the directory is packaged and compressed to form a single file in the name version.tgz format, which is convenient for transmission and storage).
For application publishers, the application can be packaged through Helm. Manage application dependencies, manage application versions and publish applications to the software warehouse.
For users, after using Helm, you don’t need to understand Kubernetes’ Yaml syntax and write application deployment files. You can download and install the required applications on kubernetes through Helm.
In addition, Helm also provides software deployment on kubernetes, delete , Upgrade, rollback application powerful functions
- The helm v2 version
contains two components, namely the helm client and the Tiller server. Helm is a command line tool for local development and management of charts, chart warehouse management, etc.
Tiller is responsible for receiving Helm requests and interacting with k8s apiserver
- The helm v3 version
removes Tiller helm directly interacting with K8s SA through kuberconfig configuration authentication
The design principle is a thread running the way
- Helm-controller runs on the master node and lists/walch HelmChart CRD objects
- Perform job update when CRD onChange
- Job Container uses rancherklilpper-helm as entrypoint
- Thelm cli in Killper-helm, you can install/upgrade/delete the corresponding chart
k8s has been installed and proficient in using kubectl and yaml configuration files
# Go to Git to download the Helm binary file ( Git address )
tar -zxvf helm-v3.2.0-rc.1-linux-amd64.tar.gz
# Copy the helm binary to the bin directory
cp linux-amd64/helm /usr/local/bin/
Set the environment variable KUBECONFIG to specify the storage ApiServre address and token configuration file address, the default is ~/.kube/config
# Configure helm3 warehouse
helm repo add repo_name1 https://aliacs-app-catalog.oss-cn-hangzhou.aliyuncs.com/charts-incubator/
# Configure helm3 warehouse (ignore: I want to try to add more Warehouse)
helm repo add stable https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
helm repo update
helm repo list
# Generate chart file Here will generate a nginx directory as follows:
sudo apt-get install tree
helm create nginx
#Charts file dependent on other packages
-Chart.yaml? # The chart description file, including ico address, version information, etc.
- templates? #Store k8s template file directory
-deployment.yaml? #Create yaml template of k8s resource
-helpers.tpl? #Files beginning with an underscore, Can be referenced by other templates.
- hpa.yaml? # Configure service resource CPU memory│??
- ingress.yaml? # Ingress configuration with service domain name
#Description file, the content shown to users after helm install│?? -service.yaml? #Kubernetes Serivce yaml template
-values.yaml? # Variables used for template files
# Modify the type of service in values.yam to NodePort
# Install the chart task (note that there is a point behind)
helm install -f values.yaml nginx1.
To facilitate testing, change the exposure method. change the service to Nodport
# Query release
# delete release
Use the K8S command to check whether the service is successfully
started.Access k8s_node_IP: 31759