In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
I. Overview of Helm introduction to 1.Helm
Helm is similar to the package management tools under Linxu system, such as yum, apt, etc., which is mainly used for the creation, packaging, distribution of Kubernetes application Chart and the creation and management of local and remote Chart repositories.
2.Helm component helm: a local client tool, mainly used for creating / packaging / publishing kubernetes application chart and creating and managing and remote Chart repositories. The server of Tiller:helm is deployed in kubernetes. Tiller accepts requests from helm, generates a kubernetes deployment file based on chart (helm is called release), and then submits it to Kubernetes to create an application. Tiller also provides a series of functions such as Release upgrade, deletion, rollback and so on. Chart:helm 's software package, in tar format, contains all the image / dependency / resource definitions needed to run an application, etc., and may also contain service definitions in the kubernetes cluster, similar to yum's rpm file Release: a Chart instance running in a cluster in kubernetes, a Chart can be installed multiple times on the same cluster, and each installation will generate a new release. Repository: warehouse II for publishing and storing Chart, Helm deployment 1. Install Helm# wget https://get.helm.sh/helm-v2.14.3-linux-amd64.tar.gz# tar-zxvf helm-v2.14.3-linux-amd64.tar.gz# cp linux-amd64/helm / usr/bin/# helm versionClient: & version.Version {SemVer: "v2.14.3", GitCommit: "0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085", GitTreeState: "clean"} Error: could not find tiller2. Install Tiller
The node where tiller is located needs to install socat
By default, helm uses "https://kubernetes-charts.storage.googleapis.com" as the default stable repository address." The # helm init-- upgrade-I registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.14.3-- stable-repo-url https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts# kubectl get pod-n kube-system that needs to be replaced by Ali due to inaccessibility in China | grep tillertiller-deploy-6867df9fc6-f575p 1 Running 0 3m50s# helm versionClient: & version.Version {SemVer: "v2.14.3", GitCommit: "0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085" GitTreeState: "clean"} Server: & version.Version {SemVer: "v2.14.3", GitCommit: "0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085", GitTreeState: "clean"} 3.Tiller configuration rbac
Role-based Access Control
# cat tiller-rbac.yaml apiVersion: v1kind: ServiceAccountmetadata: name: tiller namespace: kube-system---apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRoleBindingmetadata: name: tillerroleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: cluster-adminsubjects:-kind: ServiceAccount name: tiller namespace: kube-system
Set up an account for tiller
# kubectl patch deploy-- namespace kube-system tiller-deploy-p'{"spec": {"template": {"spec": {"serviceAccount": "tiller"}}'# kubectl get deploy-n kube-system tiller-deploy-o yaml | grep serviceAccount serviceAccount: tiller serviceAccountName: tiller4. Uninstall Tiller
If you need to uninstall a deployed Tiller, you can use the following command to complete the uninstall.
Helm reset or helm reset-- force
3. Helm uses 1.helm command to complete # source > ~ / .bashrc2. Add warehouse # helm repo listNAME URL stable https://mirror.azure.cn/kubernetes/charts local http://127.0.0.1:8879/charts# helm repo add aliyun https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts"aliyun" has been added to your repositories# helm repo update Hang tight while we grab the latest from your chart repositories.. .. Skip local chart repository...Successfully got an update from the "aliyun" chart repository...Successfully got an update from the "stable" chart repositoryUpdate Complete.3.Helm Common commands helm Common commands:-helm search: search charts- helm fetch: download charts to the local directory-helm install: install charts- helm list: list all versions of charts Command option: completion is specified Shell generates an automatic completion script (bash or zsh) create to create a new charts delete to delete the specified version of release dependency management charts dependent fetch download charts and unzip it to the local directory get to download a release history release history information home to display the helm directory Record init initialize helm inspect on the client and server to view the details of charts install installation of charts lint detection package problems list list release package chart directory to package plugin add and delete Helm plug-in repo Chart repository reset uninstall tiller rollback release version rollback search search chart serve launch a local http server status view release status information template local template test release test upgrade release update verify verify chart signature and have The expiration date version prints the version information of the client and server 4. Install Monocular using helm
Monocular is open source software for managing services created in the form of Helm Charts on kubernetes. You can install helm Charts through its web page
① install Nginx Ingress
# cat ingress-values.yamlcontroller: service: type: NodePort targetPorts: http: 80 https: 443 nodePorts: http: 32080 https: 32443 hostNetwork: truerbac: create: true# helm install-- name nginx-ingress aliyun/nginx-ingress-f ingress-values.yaml# kubectl get pod NAME READY STATUS RESTARTS AGEnginx-ingress-controller-658f4878bf-rvx29 1 / 1 Running 0 6m54snginx-ingress-default-backend-878d64884-z7qw9 1 app=nginx-ingressNAME TYPE CLUSTER-IP EXTERNAL-IP PORT 1 Running 0 6m54s# kubectl get svc-l app=nginx-ingressNAME TYPE CLUSTER-IP EXTERNAL-IP PORT (S) AGEnginx-ingress-controller NodePort 10.108.114.19 80:32080/TCP 443:32443/TCP 7m34snginx-ingress-default-backend ClusterIP 10.102.104.170 80/TCP 7m34s
② install Monocular
# helm repo add monocular https://helm.github.io/monocular# helm install monocular/monocular-- name monocular# kubectl get pod | grep monocularmonocular-mongodb-64df9c7fb6-tp55x 1 Running 0 3m24smonocular-monocular-chartsvc-58cf779c5b-422bj 1 Running 2 3m23smonocular-monocular-chartsvc-58cf779c5b-8wrvr 1 Running 2 3m24smonocular-monocular -chartsvc-58cf779c5b-czppl 1 to 1 Running 1 3m23smonocular-monocular-prerender-565885d9dd-sql5k 1 to 1 Running 0 3m24smonocular-monocular-sync-initial-incubator-uuk6q-h7nhv 0 to 1 Completed 2 3m23smonocular-monocular-sync-initial-stable-4dsb2-qc5pn 1 to Running 1 3m23smonocular-monocular-ui-6f8bbd67b-n55vb 1 Running 0 3m23smonocular-monocular-ui-6f8bbd67b-xdql4 1 Running 0 3m23s# kubectl get svcNAME TYPE CLUSTER-IP EXTERNAL-IP PORT (S) AGEkubernetes ClusterIP 10.96.0.1 443/TCP 8dmonocular-mongodb ClusterIP 10.98.190.128 27017/TCP 4m15smonocular-monocular-chartsvc ClusterIP 10.108.54.177 8080/TCP 4m15smonocular-monocular-prerender NodePort 10.107.66.9 80:31915/TCP 4m15smonocular-monocular -ui NodePort 10.101.12.118 80:31939/TCP 4m15snginx-ingress-controller NodePort 10.108.114.19 80:32080/TCP 443:32443/TCP 48mnginx-ingress-default-backend ClusterIP 10.102.104.170 80/TCP 48m# kubectl get ingressNAME HOSTS ADDRESS PORTS AGEmonocular-monocular * 80 4m8s
③ access test
(unresolved) unreachable when accessing port 32080 of ingress map
5. Delete the installed chart# helm delete-- purge monocularrelease "monocular" deleted
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.