栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

helm3 常用命令

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

helm3 常用命令

1.查看版本
[root@rds005-master-1 hello]# helm version
version.BuildInfo{Version:"v3.6.0", GitCommit:"7f2df6467771a75f5646b7f12afb408590ed1755", GitTreeState:"clean", GoVersion:"go1.16.3"}

2.仓库管理
# helm repo add stable https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts


[root@rds005-master-1 hello]# helm repo add apphub https://apphub.aliyuncs.com
"apphub" has been added to your repositories

[root@rds005-master-1 helm]# helm repo list
NAME    URL
apphub  https://apphub.aliyuncs.com

[root@rds005-master-1 helm]# helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "apphub" chart repository
Update Complete. ⎈Happy Helming!⎈




3.部署应用
[root@rds005-master-1 helm]# helm search repo nacos
NAME            CHART VERSION   APP VERSION     DEscriptION
apphub/nacos    0.1.0           1.0             A Helm chart for Kubernetes
[root@rds005-master-1 helm]# helm install apphub/nacos -n default
Error: must either provide a name or specify --generate-name
[root@rds005-master-1 helm]# helm install -name lys-nacos apphub/nacos -n default
NAME: lys-nacos
LAST DEPLOYED: Sat Nov 13 15:17:13 2021
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
1. Get the application URL by running these commands:
  export NODE_PORT=$(kubectl get --namespace default -o jsonpath="{.spec.ports[0].nodePort}" services  nacos-cs
  export NODE_IP=$(kubectl get nodes --namespace default -o jsonpath="{.items[0].status.addresses[0].address}")
  echo http://$NODE_IP:$NODE_PORT/nacos
2. MODE:
   quickstart: you need to modify replicaCount in the values.yaml, .Values.replicaCount=1
   standalone: you need to modify replicaCount in the values.yaml, .Values.replicaCount=1
   cluster: kubectl scale sts default-nacos --replicas=3


[root@rds005-master-1 helm]# helm uninstall  lys-nacos
release "lys-nacos" uninstalled

4.拉取
[root@rds005-master-1 helm]# helm search repo gitlab
NAME                    CHART VERSION   APP VERSION     DEscriptION
apphub/docker-gitlab    0.1.1           v12.1.6         GitLab CE is set up in the Docker image using t...
stable/gitlab-ce        0.2.1                           GitLab Community Edition
stable/gitlab-ee        0.2.1                           GitLab Enterprise Edition
[root@rds005-master-1 helm]# mkdir gitlab
[root@rds005-master-1 helm]# cd gitlab/
[root@rds005-master-1 gitlab]# ls
[root@rds005-master-1 gitlab]# helm pull apphub/docker-gitlab
[root@rds005-master-1 gitlab]# ls
docker-gitlab-0.1.1.tgz
[root@rds005-master-1 gitlab]# tar -zxvf docker-gitlab-0.1.1.tgz
参考文档

https://helm.sh/docs/

https://artifacthub.io/

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/490348.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号