Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

K8s practice (9): Helm and Kubeapps UI

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Environment description:

Hostname operating system version ipdocker versionkubelet versionhelm version configuration remarks masterCentos 7.6.1810172.27.9.131Docker 18.09.6V1.14.2v2.14.32C2Gmaster host node01Centos 7.6.1810172.27.9.135Docker 18.09.6V1.14.2v2.14.32C2Gnode node node02Centos 7.6.1810172.27.9.136Docker 18.09.6V1.14.2v2.14.32C2Gnode node centos7Centos 7.3.1611172.27.9.181 × × × 1C1Gnfs server

For more information on k8s cluster deployment, please see Centos7.6 deployment k8s (v1.14.2) cluster.

For more information on K8s learning materials, see: basic concepts, kubectl commands and data sharing.

For more information on k8s high availability cluster deployment, please see Centos7.6 deployment k8s v1.16.4 high availability cluster (active / standby mode)

1. Introduction to Helm

   Helm is a Kubemetes package manager (similar to the OS package manager, such as yum, apt in Linux, or homebrew in MacOS).

   Helm consists of two parts: the helm client and the tiller server.

Helm client

The helm client is a command-line tool that manages charts, repository, and release. It sends requests to tiller through gPRC API (using kubectl port-forward to map the port of tiller locally, and then communicates with tiller through the mapped port), and tiller manages the corresponding Kubernetes resources. Helm function:

Local Charts development; manage Charts repository; interact with Tiller server: send Charts to install and query information about Release and upgrade or uninstall existing Release

Tiller server

Tiller receives requests from helm clients and sends operations on related resources to Kubernetes, which is responsible for managing (installation, query, upgrade or deletion, etc.) and tracking Kubernetes resources. In order to facilitate management, tiller stores the information about release in the ConfigMap of kubernetes. Tiller function:

Listen for requests from helm clients; merge Charts and configuration to build a Release; install Charts to the Kubernetes cluster and track the corresponding Release; upgrade and uninstall Charts

two。 Why do you need Helm

Although    Kubernetes provides a variety of container orchestration objects, such as Deployment, StatefulSet, DeamonSet, Job, etc., as well as a variety of basic resource encapsulation such as ConfigMap, Secret, Serivce, etc., an application often has multiple services, and some may also rely on persistent storage. When these services are directly interdependent and require a certain combination, the use of YAML files to configure applications is often tedious and error-prone. At this point, a service orchestration tool is needed.

   service orchestration management tool is built on the basis of kubernetes object to coordinate the relationships and dependencies between various services. At present, the commonly used tool is Helm.

3. Helm core term Chart: a Helm package that contains the tools and resource definitions needed to run an application, and may also contain service definitions in a Kubernetes cluster, similar to formula in Homebrew, dpkg in APT, or RPM file in Yum: Release: a Chart instance running on a Kubernetes cluster. A Chart can be installed multiple times on the same cluster. For example, there is a MySQLChart, if you want to run two MySQL databases on the server, you can install based on this Chart twice, each installation will generate a new Release, with a separate Release name; Repository: a repository for storing and sharing Chart.

Helm installs charts into Kubernetes, creating a new release for each installation. To find the new chart, search the Helm charts repository repositories.

Second, install Helm1. Install Helm Client

The Helm client can be installed from source code, or you can install or execute installation scripts from a pre-built binary version.

1.1 script installation method

Helm now has an installation shell script that will automatically get the latest version of the Helm client and install it locally.

[root@master ~] # curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash

Script installation is simple, just execute a command.

1.2 binary installation

In this way, you can choose the helm client installation version and download the binary file: https://github.com/helm/helm/releases/, for example, download version 2.14.2:

[root@master] # curl-L https://get.helm.sh/helm-v2.14.2-linux-amd64.tar.gz-o helm-v2.14.2-linux-amd64.tar.gz [root@master ~] # tar-zxvf helm-v2.14.2-linux-amd64.tar.gz linux-amd64/linux-amd64/LICENSElinux-amd64/helmlinux-amd64/README.mdlinux-amd64/tiller [root@master ~] # cp linux-amd64/helm / usr/bin [root@ Master ~] # helm versionClient: & version.Version {SemVer: "v2.14.2" GitCommit: "a8b13cc5ab6a7dbef0a58f5061bcc7c0c61598e7", GitTreeState: "clean"} Error: could not find tiller

Download the binary file, extract and copy the command, execute the helm version command and find that the helm client version is v2.14.2, and the server tiller has not been installed. The test in this paper is based on the latest version of v2.14.3.

1.3 Command completion [root@master ~] # echo "source

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report