helm常用命令

helm install

helm install demo/     #本地
helm install demo-0.2.0.tgz   # 本地
helm install install chartmuseum/demo --version 0.1.0 --name demo --namespace default  # 从仓库chartmuseum中拉取demo,并且版本为0.1.0 release名字为demo  命令空间为default

helm package

helm package demo/
[root@t31 helm]# helm search demo 
NAME                CHART VERSION   APP VERSION DESCRIPTION                
chartmuseum/demo    0.2.0           1.0         A Helm chart for Kubernetes

helm search -l

[root@t31 helm]# helm search demo  -l
NAME                CHART VERSION   APP VERSION DESCRIPTION                
chartmuseum/demo    0.2.0           1.0         A Helm chart for Kubernetes
chartmuseum/demo    0.1.0           1.0         A Helm chart for Kubernetes

helm list

[root@t31 helm]# helm list
NAME            REVISION    UPDATED                     STATUS      CHART                   APP VERSION NAMESPACE   
cert-manager    1           Thu Sep 19 18:07:10 2019    DEPLOYED    cert-manager-v0.10.0    v0.10.0     cert-manager
demo            2           Wed Sep 25 19:24:40 2019    DEPLOYED    demo-0.2.0              1.0         default     
test            1           Wed Sep 25 15:37:08 2019    DEPLOYED    test-0.1.0              1.0         default

helm list -a

[root@t31 helm]# helm list -a 
NAME                REVISION    UPDATED                     STATUS      CHART                   APP VERSION NAMESPACE   
belligerent-eel     1           Wed Sep 25 19:06:41 2019    DELETED     demo-0.1.0              1.0         default     
cert-manager        1           Thu Sep 19 18:07:10 2019    DEPLOYED    cert-manager-v0.10.0    v0.10.0     cert-manager
coy-eagle           1           Wed Sep 25 13:39:54 2019    DELETED     test-0.1.0              1.0         default     
demo                2           Wed Sep 25 19:24:40 2019    DEPLOYED    demo-0.2.0              1.0         default     
eating-duck         1           Wed Sep 25 19:22:32 2019    DELETED     demo-0.1.0              1.0         default     
opinionated-garfish 1           Wed Sep 25 19:00:53 2019    DELETED     demo-0.1.0              1.0         default     
test                1           Wed Sep 25 15:37:08 2019    DEPLOYED    test-0.1.0              1.0         default  

helm delete

[root@t31 helm]# helm delete test 
release "test" deleted
[root@t31 helm]# helm list 
NAME            REVISION    UPDATED                     STATUS      CHART                   APP VERSION NAMESPACE   
cert-manager    1           Thu Sep 19 18:07:10 2019    DEPLOYED    cert-manager-v0.10.0    v0.10.0     cert-manager
demo            2           Wed Sep 25 19:24:40 2019    DEPLOYED    demo-0.2.0              1.0         default 

helm upgrade

[root@t31 helm]# helm upgrade demo chartmuseum/demo

helm push

安装

helm plugin install https://github.com/chartmuseum/helm-push

push

root@t32 helm]# helm push demo-0.1.0.tgz  chartmuseum
Pushing demo-0.1.0.tgz to chartmuseum...
Error: 409: demo-0.1.0.tgz already exists
Error: plugin "push" exited with error

helm repo

helm repo add

[root@t31 .helm]# helm repo add chartmuseum http://192.168.4.32:9090 --username  admin --password  admin
"chartmuseum" has been added to your repositories

helm repo list

[root@t31 .helm]# helm repo list 
NAME        URL                                                
local       http://127.0.0.1:8879/charts                       
incubator   http://mirror.azure.cn/kubernetes/charts-incubator/
stable      http://mirror.azure.cn/kubernetes/charts/          
chartmuseum http://192.168.4.32:9090

help repo remove

[root@t31 .helm]# helm repo remove chartmuseum
"chartmuseum" has been removed from your repositories
[root@t31 .helm]# helm repo list 
NAME        URL                                                
local       http://127.0.0.1:8879/charts                       
incubator   http://mirror.azure.cn/kubernetes/charts-incubator/
stable      http://mirror.azure.cn/kubernetes/charts/ 

help repo update

[root@t31 helm]# helm repo update
Hang tight while we grab the latest from your chart repositories...
...Skip local chart repository
...Successfully got an update from the "incubator" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈ Happy Helming!⎈ 

你可能感兴趣的:(helm常用命令)