You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Jenkins虚拟机中使用Helm部署Chart遇命令未识别,求安装方法

Fixing 'helm: not found' in Jenkins Freestyle Projects

Hey, let's tackle that frustrating 'helm: not found' error you're hitting. The root issue is that the Jenkins user (or the node running your job) doesn't have Helm in its system PATH. Here are three solid ways to resolve this:

1. Install Helm directly on your Jenkins node (master or agent)

This is the most straightforward approach if you want Helm available globally for all Jenkins jobs. Log into the server where Jenkins is running (or your agent node) and run these commands:

# Download the latest stable Helm version (replace with your preferred version if needed)
curl -fsSL https://get.helm.sh/helm-v3.12.0-linux-amd64.tar.gz -o helm.tar.gz
# Extract the archive
tar -zxvf helm.tar.gz
# Move the Helm binary to a directory in your system PATH
sudo mv linux-amd64/helm /usr/local/bin/
# Verify the installation
helm version

After this, any Jenkins job running on this node will be able to call helm directly.

2. Install Helm temporarily within your Jenkins job

If you don't have access to the node's system, or want to use a specific Helm version for just this job, you can install it on the fly in your build steps:

  1. In your freestyle project, add an "Execute shell" build step
  2. Paste this script (adjust the Helm version as needed):
# Download and extract Helm to the job's working directory
curl -fsSL https://get.helm.sh/helm-v3.12.0-linux-amd64.tar.gz -o helm.tar.gz
tar -zxvf helm.tar.gz
# Add the extracted Helm binary to the current session's PATH
export PATH=$PATH:$PWD/linux-amd64
# Now run your Helm deployment command
helm install my-release ./your-chart-directory

This ensures Helm is available just for the duration of your job.

3. Use the Jenkins Helm Plugin (you might have missed it!)

You mentioned not finding a Helm plugin—chances are you used the wrong search term. There's an official plugin that lets Jenkins manage Helm installations for you:

  • Go to Manage Jenkins > Manage Plugins
  • Switch to the Available tab, then search for "Helm Plugin" (or "Kubernetes Helm Integration")
  • Install the plugin and restart Jenkins
  • Next, go to Manage Jenkins > Global Tool Configuration
  • Scroll down to the Helm section, click Add Helm, give it a name, select your desired version, and check "Install automatically"
  • Save the configuration
  • Now, in your freestyle project, you can add a "Helm Command" build step instead of a generic shell step—Jenkins will handle making Helm available for you.

Any of these methods should get you past the 'helm: not found' error and let you deploy your charts smoothly.

内容的提问来源于stack exchange,提问作者Jonathan Thompson

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.07 09:07:30