{"id":20242,"date":"2026-04-24T15:03:08","date_gmt":"2026-04-24T07:03:08","guid":{"rendered":"https:\/\/blog.ywdevops.cn\/?p=20242"},"modified":"2026-04-24T15:27:38","modified_gmt":"2026-04-24T07:27:38","slug":"helm","status":"publish","type":"post","link":"https:\/\/blog.ywdevops.cn\/index.php\/2026\/04\/24\/helm\/","title":{"rendered":"helm\u5305\u7ba1\u7406\u5de5\u5177"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Helm \u662f <strong>Kubernetes\uff08K3s\/K8s\uff09\u7684\u5305\u7ba1\u7406\u5668<\/strong>\uff0c\u5c31\u50cf Linux \u7684 <code>apt<\/code>\/<code>yum<\/code>\u3001Python \u7684 <code>pip<\/code>\uff0c\u4e13\u95e8\u7528\u6765<strong>\u4e00\u952e\u5b89\u88c5\u3001\u7ba1\u7406\u3001\u5347\u7ea7\u96c6\u7fa4\u91cc\u7684\u590d\u6742\u5e94\u7528<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e00\u3001\u4e00\u53e5\u8bdd\u5b9a\u4f4d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Helm = K8s \u5e94\u7528\u7684 \u201c\u4e00\u952e\u5b89\u88c5 + \u7248\u672c\u7ba1\u7406 + \u914d\u7f6e\u4e2d\u5fc3\u201d \u5de5\u5177\uff0c\u5e95\u5c42\u8fd8\u662f\u8c03\u7528 <code>kubectl<\/code> API\uff0c\u4f46\u5e2e\u4f60\u628a\u4e00\u5806 YAML \u6253\u5305\u3001\u6a21\u677f\u5316\u3001\u53ef\u590d\u7528<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e8c\u3001\u4e09\u5927\u6838\u5fc3\u6982\u5ff5\uff08\u5fc5\u987b\u61c2\uff09<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\u6982\u5ff5<\/th><th>\u901a\u4fd7\u7406\u89e3<\/th><th>\u4f5c\u7528<\/th><\/tr><\/thead><tbody><tr><td><strong>Chart<\/strong><\/td><td>\u5e94\u7528\u5b89\u88c5\u5305\uff08<code>.tgz<\/code>\uff09<\/td><td>\u5305\u542b\u6240\u6709 K8s \u8d44\u6e90\u6a21\u677f\uff08Deployment\/Service\/Ingress \u7b49\uff09+ \u9ed8\u8ba4\u914d\u7f6e<\/td><\/tr><tr><td><strong>Repository<\/strong><\/td><td>\u5e94\u7528\u5546\u5e97<\/td><td>\u5b58\u653e Chart \u7684\u4ed3\u5e93\uff08\u5982 Bitnami\u3001\u5b98\u65b9\u4ed3\u5e93\uff09\uff0c\u53ef\u6dfb\u52a0\u3001\u641c\u7d22\u3001\u4e0b\u8f7d<\/td><\/tr><tr><td><strong>Release<\/strong><\/td><td>\u5df2\u5b89\u88c5\u7684\u5e94\u7528\u5b9e\u4f8b<\/td><td>\u6bcf\u4e2a <code>helm install<\/code> \u751f\u6210\u4e00\u4e2a Release\uff0c\u53ef\u591a\u5b9e\u4f8b\u3001\u53ef\u56de\u6eda\u3001\u53ef\u5378\u8f7d<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e09\u3001Helm 3 \u6838\u5fc3\u7279\u70b9\uff08\u73b0\u5728\u90fd\u7528 V3\uff09<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u7eaf\u5ba2\u6237\u7aef<\/strong>\uff1a\u53bb\u6389\u4e86\u65e7\u7248\u7684 Tiller \u670d\u52a1\u7aef\uff0c\u76f4\u63a5\u7528\u4f60\u7684 <code>kubeconfig<\/code> \u6743\u9650\u64cd\u4f5c\u96c6\u7fa4\uff0c\u66f4\u5b89\u5168\u3001\u66f4\u7b80\u5355<\/li>\n\n\n\n<li><strong>\u6a21\u677f\u5316\u914d\u7f6e<\/strong>\uff1a\u7528 <code>values.yaml<\/code> \u7edf\u4e00\u6539\u53c2\u6570\uff0c\u4e0d\u7528\u624b\u52a8\u6539\u4e00\u5806 YAML<\/li>\n\n\n\n<li><strong>\u7248\u672c\u4e0e\u56de\u6eda<\/strong>\uff1a<code>helm upgrade<\/code>\/<code>helm rollback<\/code> \u4e00\u952e\u5347\u7ea7 \/ \u56de\u9000\uff0c\u6709\u5386\u53f2\u8bb0\u5f55<\/li>\n\n\n\n<li><strong>\u4e00\u952e\u6e05\u7406<\/strong>\uff1a<code>helm uninstall<\/code> \u81ea\u52a8\u5220\u5e72\u51c0\u6240\u6709\u5173\u8054\u8d44\u6e90\uff0c\u65e0\u6b8b\u7559Helm<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u56db\u3001\u4e3a\u4ec0\u4e48\u8981\u7528 Helm\uff08\u5bf9\u6bd4\u7eaf kubectl\uff09<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u7eaf kubectl<\/strong>\uff1a\u5199\u4e00\u5806 YAML \u2192 \u9010\u4e2a <code>apply<\/code> \u2192 \u6539\u914d\u7f6e\u8981\u9010\u4e2a\u6539 \u2192 \u5347\u7ea7 \/ \u56de\u6eda \/ \u5378\u8f7d\u9ebb\u70e6 \u2192 \u65e0\u7248\u672c\u8bb0\u5f55<\/li>\n\n\n\n<li><strong>Helm<\/strong>\uff1a\u4e00\u6761\u547d\u4ee4\u5b89\u88c5 \u2192 \u7edf\u4e00 <code>values.yaml<\/code> \u914d\u7f6e \u2192 \u4e00\u952e\u5347\u7ea7 \/ \u56de\u6eda \/ \u5378\u8f7d \u2192 \u6709\u7248\u672c\u3001\u53ef\u590d\u7528\u3001\u9002\u5408\u751f\u4ea7<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e94\u3001\u5e38\u7528\u547d\u4ee4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># 1. \u6dfb\u52a0\u4ed3\u5e93\uff08\u4ee5 Bitnami \u4e3a\u4f8b\uff09\r\nhelm repo add bitnami https:\/\/charts.bitnami.com\/bitnami\r\nhelm repo update\r\n\r\n# 2. \u641c\u7d22 Chart\r\nhelm search repo nginx\r\n\r\n# 3. \u5b89\u88c5\uff08\u751f\u6210 Release\uff09\r\nhelm install my-nginx bitnami\/nginx\r\n\r\n# 4. \u67e5\u770b\u5df2\u5b89\u88c5\u7684 Release\r\nhelm list\r\n\r\n# 5. \u5347\u7ea7\uff08\u6539\u914d\u7f6e\u540e\uff09\r\nhelm upgrade my-nginx bitnami\/nginx -f values.yaml\r\n\r\n# 6. \u56de\u6eda\r\nhelm rollback my-nginx 1\r\n\r\n# 7. \u5378\u8f7d\uff08\u5f7b\u5e95\u6e05\u7406\uff09\r\nhelm uninstall my-nginx<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u516d\u3001\u573a\u666f\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u96c6\u7fa4\u7ec4\u4ef6<\/strong>\uff1aLonghorn\u3001Traefik\u3001Prometheus\u3001Grafana \u7b49 \u2192 <strong>\u5fc5\u987b\u7528 Helm<\/strong>\uff0c\u7701\u5fc3\u3001\u6613\u7ef4\u62a4<\/li>\n\n\n\n<li><strong>\u7b80\u5355\u4e1a\u52a1<\/strong>\uff1a\u5355\u4e2a Nginx\u3001\u5c0f\u670d\u52a1 \u2192 \u53ef\u7528 <code>kubectl<\/code> \u6216 Helm<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e00\u53e5\u8bdd\u603b\u7ed3\uff1a<strong>Helm \u8ba9 K8s \u5e94\u7528\u90e8\u7f72\u4ece \u201c\u624b\u52a8\u62fc\u79ef\u6728\u201d \u53d8\u6210 \u201c\u4e00\u952e\u5b89\u88c5\u8f6f\u4ef6<\/strong>\u201c<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e03\u3001\u5b89\u88c5<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e00\u952e\u5b89\u88c5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl https:\/\/raw.githubusercontent.com\/helm\/helm\/main\/scripts\/get-helm-3 | bash<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u67e5\u770b\u7248\u672c\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"646\" height=\"108\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2026\/04\/1-8.png\" alt=\"\" class=\"wp-image-20249\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2026\/04\/1-8.png 646w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2026\/04\/1-8-300x50.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2026\/04\/1-8-600x100.png 600w\" sizes=\"auto, (max-width: 646px) 100vw, 646px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u77e5\u540d\u516c\u5171\u4ed3\u5e93\uff08\u5e38\u7528\uff09\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Bitnami\uff1a<a rel=\"noreferrer noopener\" href=\"https:\/\/charts.bitnami.com\/bitnami\" target=\"_blank\">https:\/\/charts.bitnami.com\/bitnami<\/a>\uff08\u6700\u5e38\u7528\uff0c\u66ff\u4ee3\u539f stable\uff09<\/li>\n\n\n\n<li>Prometheus Community\uff1a<a rel=\"noreferrer noopener\" href=\"https:\/\/prometheus-community.github.io\/helm-charts\" target=\"_blank\">https:\/\/prometheus-community.github.io\/helm-charts<\/a><\/li>\n\n\n\n<li>Grafana\uff1a<a rel=\"noreferrer noopener\" href=\"https:\/\/grafana.github.io\/helm-charts\" target=\"_blank\">https:\/\/grafana.github.io\/helm-charts<\/a><\/li>\n\n\n\n<li>Jetstack\uff08Cert-Manager\uff09\uff1a<a rel=\"noreferrer noopener\" href=\"https:\/\/charts.jetstack.io\" target=\"_blank\">https:\/\/charts.jetstack.io<\/a><\/li>\n\n\n\n<li>Elastic\uff1a<a rel=\"noreferrer noopener\" href=\"https:\/\/helm.elastic.co\" target=\"_blank\">https:\/\/helm.elastic.co<\/a><\/li>\n\n\n\n<li>Harbor\uff1a<a rel=\"noreferrer noopener\" href=\"https:\/\/helm.goharbor.io\" target=\"_blank\">https:\/\/helm.goharbor.io<\/a><\/li>\n\n\n\n<li>Nginx Ingress\uff1a<a rel=\"noreferrer noopener\" href=\"https:\/\/kubernetes.github.io\/ingress-nginx\" target=\"_blank\">https:\/\/kubernetes.github.io\/ingress-nginx<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Helm \u662f Kubernetes\uff08K3s\/K8s\uff09\u7684\u5305\u7ba1\u7406\u5668\uff0c\u5c31\u50cf Linux \u7684 apt\/yum\u3001Pyth [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":20243,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[],"class_list":["post-20242","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":8}},"_links":{"self":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/20242","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/comments?post=20242"}],"version-history":[{"count":6,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/20242\/revisions"}],"predecessor-version":[{"id":20251,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/20242\/revisions\/20251"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media\/20243"}],"wp:attachment":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media?parent=20242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/categories?post=20242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/tags?post=20242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}