|NO.Z.00271|——————————|^^ 部署 ^^|——|KuberNetes&中间件容器化及helm.V18|——|中间件.v02|helm.v3.5.4|常用操作|
一、helm常用操作
### --- helm的常用操作
~~~ helm fetch for helm v2
### --- 添加一个仓库到helm
[root@k8s-master01 helm]# helm repo add bitnami https://charts.bitnami.com/bitnami
"bitnami" has been added to your repositories
~~~ # 再添加一个aliyun的helm仓库
[root@k8s-master01 helm]# helm repo add ali-stable https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
"ali-stable" has been added to your repositories
### --- 查看添加的仓库
[root@k8s-master01 helm]# helm repo list
NAME URL
bitnami https://charts.bitnami.com/bitnami
ali-stable https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
二、通过helm操作harbor示例
### --- 搜索需要的harbor包
[root@k8s-master01 helm]# helm search repo harbor
NAME CHART VERSION APP VERSION DESCRIPTION
bitnami/harbor 10.0.3 2.2.2 Harbor is an an open source trusted cloud nativ...
### --- 把harbor宕下来
[root@k8s-master01 helm]# helm pull bitnami/harbor
[root@k8s-master01 helm]# ll
total 12292
-rw-r--r-- 1 root root 201526 May 22 15:07 harbor-10.0.3.tgz
### --- 解压harbor的包
[root@k8s-master01 helm]# tar -zxvf harbor-10.0.3.tgz
### --- 查看harbor的模板文件
~~~ 然后可以通过这些模板可以生产deployment或者configmap的文件
[root@k8s-master01 helm]# ls harbor/templates/nginx/
configmap-https.yaml configmap-http.yaml deployment.yaml secret.yaml service.yaml
Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart
——W.S.Landor
浙公网安备 33010602011771号