{"id":207166,"date":"2020-12-20T08:34:37","date_gmt":"2020-12-20T00:34:37","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=207166"},"modified":"2020-12-16T08:35:46","modified_gmt":"2020-12-16T00:35:46","slug":"helm-common-commands","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/helm-common-commands.html","title":{"rendered":"helm\u5e38\u7528\u547d\u4ee4\u89e3\u6790"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nHelm \u5e2e\u52a9\u60a8\u7ba1\u7406 Kubernetes \u5e94\u7528\u2014\u2014Helm \u56fe\u8868\uff0c\u5373\u4f7f\u662f\u6700\u590d\u6742\u7684 Kubernetes \u5e94\u7528\u7a0b\u5e8f\uff0c\u90fd\u53ef\u4ee5\u5e2e\u52a9\u60a8\u5b9a\u4e49\uff0c\u5b89\u88c5\u548c\u5347\u7ea7\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"\"<\/p>\n

helm\u7ba1\u7406\u547d\u4ee4<\/strong><\/span><\/div>\n

\u67e5\u770b\u7248\u672c<\/p>\n

\r\n#helm version\r\n<\/pre>\n

\u589e\u52a0repo<\/p>\n

\r\n#helm repo add stable https:\/\/kubernetes.oss-cn-hangzhou.aliyuncs.com\/charts\r\n#helm repo add --username admin --password password myharbor https:\/\/harbor.qing.cn\/chartrepo\/charts\r\n<\/pre>\n

\u66f4\u65b0repo\u4ed3\u5e93\u8d44\u6e90<\/p>\n

\r\n#helm repo update\r\n<\/pre>\n
charts\u7ba1\u7406<\/strong><\/span><\/div>\n

\u67e5\u770b\u5f53\u524d\u5b89\u88c5\u7684charts<\/p>\n

\r\n#helm list\r\n<\/pre>\n

\u5c06helm search hub\u663e\u793a\u6240\u6709\u53ef\u7528\u56fe\u8868\u3002<\/p>\n

\r\n#helm search hub redis\r\n<\/pre>\n

\u4f7f\u7528helm search repo\uff0c\u60a8\u53ef\u4ee5\u5728\u5df2\u6dfb\u52a0\u7684\u5b58\u50a8\u5e93\u4e2d\u627e\u5230charts\u7684\u540d\u79f0\uff1a<\/p>\n

\r\n#helm search repo redis\r\n<\/pre>\n

\u6253\u5370\u51fa\u6307\u5b9a\u7684Charts\u7684\u8be6\u7ec6\u4fe1\u606f<\/p>\n

\r\n#helm show chart stable\/redis\r\n<\/pre>\n

\u4e0b\u8f7dcharts\u5230\u672c\u5730<\/p>\n

\r\n#helm fetch redis\r\n<\/pre>\n

\u5b89\u88c5charts<\/p>\n

\r\n#helm install redis stable\/redis\r\n<\/pre>\n

\u67e5\u770bcharts\u72b6\u6001<\/p>\n

\r\n#helm status redis\r\n<\/pre>\n

\u5220\u9664charts<\/p>\n

\r\n#helm uninstall redis\r\n<\/pre>\n
\u81ea\u5b9a\u4e49charts<\/strong><\/span><\/div>\n

\u521b\u5efacharts<\/p>\n

\r\n#helm create helm_charts\r\n<\/pre>\n

\u68c0\u67e5chart\u8bed\u6cd5\u6b63\u786e\u6027<\/p>\n

\r\n# helm lint myapp\r\n<\/pre>\n

\u6253\u5305\u81ea\u5b9a\u4e49\u7684chart<\/p>\n

\r\n# helm package myapp\r\n<\/pre>\n

\u67e5\u770b\u751f\u6210\u7684yaml\u6587\u4ef6<\/p>\n

\r\n#helm template myapp-1.tgz\r\n<\/pre>\n

\u4f7f\u7528\u9ed8\u8ba4chart\u90e8\u7f72\u5230k8s<\/p>\n

\r\nhelm install myapp myapp-1.tgz\r\n<\/pre>\n

\u4f7f\u7528\u5305\u53bb\u505arelease\u90e8\u7f72<\/p>\n

\r\nhelm install --name example2 helm-chart-0.1.0.tgz --set service.type=NodePort\r\n<\/pre>\n
\u66f4\u65b0\u4e0e\u56de\u6eda<\/strong><\/span><\/div>\n

\u67e5\u770b\u5f53\u524dchart\u4fe1\u606f<\/p>\n

\r\n#helm list\r\n<\/pre>\n

\u66f4\u65b0images<\/p>\n

\r\n#helm upgrade myapp myapp-2.tgz\r\n<\/pre>\n

\u67e5\u770b\u7248\u672c\u4fe1\u606f<\/p>\n

\r\n#helm history myapp\r\n<\/pre>\n

\u56de\u6eda\u6307\u5b9a\u7248\u672c<\/p>\n

\r\n#helm rollback myapp 1\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"

\u67e5\u770b\u7248\u672c #helm version \u589e\u52a0repo #helm repo add stable https:\/ […]<\/p>\n","protected":false},"author":668,"featured_media":207181,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-207166","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/207166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/668"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=207166"}],"version-history":[{"count":2,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/207166\/revisions"}],"predecessor-version":[{"id":207184,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/207166\/revisions\/207184"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/207181"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=207166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=207166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=207166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}