Kubernetes

Install and Use Helm 4 on Kubernetes (Linux and macOS)

Helm 3 stopped getting security fixes on November 11, 2026, so any fresh cluster should start on Helm 4. Installing it takes one script, but using it isn’t quite the Helm you knew. Server-side apply is now the default, --wait takes a strategy and watches resources with kstatus, and the plugin system checks signatures before it installs anything.

Original content from computingforgeeks.com - post 40311

To install Helm 4 on Kubernetes, this guide sets up the client on Linux and macOS, then runs a chart through the whole lifecycle: repo add, search, install, upgrade, a failed upgrade that rolls itself back, OCI charts, a server-side apply conflict and a signed plugin. Still running Helm 3 releases? Our Helm 3 to Helm 4 migration guide covers existing installs. Every command below ran on Helm 4.3.2 against a k3s v1.37.2 cluster on Ubuntu 26.04 and on an Apple silicon Mac in December 2026.

Check what Helm 4 needs before you install it

Helm is only a client, so the one real requirement is a cluster you can reach. It talks to the Kubernetes API with the same kubeconfig kubectl uses, and it stores release history as Secrets inside the cluster. That means nothing runs server side, and you can drive one cluster from several machines. Each Helm 4 minor release supports the Kubernetes minor it was compiled against and the three before it, per the Helm version support policy, so check your cluster version before you blame a chart.

  • A running Kubernetes cluster (kubeadm, k3s, EKS, GKE or AKS)
  • A working kubeconfig and kubectl on the same machine
  • curl and tar for the installer
  • jq for reading JSON output, gpg for plugin signing

Our lab cluster is a single k3s node called k8s01. We installed it with an extra TLS SAN because a Mac on another network had to reach the API on port 6443, and without the SAN the API certificate would reject that address. If you only run Helm on the node itself, drop the --tls-san part. Mode 644 lets a normal user copy the kubeconfig, but it also makes a cluster admin credential readable by every account on the node, so use it only on a single-user lab box. Our K3s install on Ubuntu covers the production options, and other ways to get a cluster are compared in our guide to k3s, kind, minikube and kubeadm.

curl -sfL https://get.k3s.io | sudo INSTALL_K3S_EXEC="--tls-san 10.0.1.50 --write-kubeconfig-mode 644" sh -
mkdir -p ~/.kube
cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
chmod 600 ~/.kube/config

Confirm the node is Ready before going further. When the kubeconfig points at nothing, Helm fails with connection errors that don’t mention the kubeconfig at all, and you can lose time debugging the wrong thing.

kubectl get nodes

The node reports Ready with the k3s build of Kubernetes, which sits at the top of the range the current Helm supports. An older cluster is fine as long as it’s within three minors of that. A cluster four or more minors behind still accepts most charts, but nobody tests that pairing, so upgrade the cluster before you file a Helm bug.

NAME    STATUS   ROLES           AGE   VERSION
k8s01   Ready    control-plane   22m   v1.37.2+k3s1

That’s the whole cluster side. Everything from here on happens in the Helm client, so if you already have a cluster you trust, this is where you start. Nothing below installs an agent or an operator on the nodes, which is why Helm 4 can sit next to an old Helm 3 binary on another machine without either one noticing.

Install Helm on Linux with the get-helm-4 script

The Helm project ships two install scripts now, and the names matter. The old get-helm-3 script still installs Helm 3, so copying a command from an older guide quietly gives you an unsupported client. Grab get-helm-4 instead. It asks get.helm.sh/helm4-latest-version for the newest release, checks the SHA256 sum and copies the binary to /usr/local/bin with sudo.

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-4
chmod 700 get_helm.sh
./get_helm.sh

The script prints the tarball it fetched and where it put the binary. Check that the version in the URL starts with v4, because a v3 there means you ran the old script by mistake.

Downloading https://get.helm.sh/helm-v4.3.2-linux-amd64.tar.gz
Verifying checksum... Done.
Preparing to install helm into /usr/local/bin
helm installed into /usr/local/bin/helm

Check the client build next. Note that helm version --client is gone in Helm 4 and returns unknown flag, so use the bare command.

helm version

The KubeClientVersion field is the one to read. It shows which Kubernetes minor this build was compiled against, which is the top of its supported range, so a cluster newer than that number is outside what the Helm team tests.

version.BuildInfo{Version:"v4.3.2", GitCommit:"8346aaa55e7161f7c547212d0a87f01367976727", GitTreeState:"clean", GoVersion:"go1.27.4", KubeClientVersion:"v1.37"}

The same install and version check on k8s01, as it appeared in the terminal.

Helm 4 installed on Ubuntu with the get-helm-4 script and helm version output

The script also reads a few environment variables, which is how you adapt it without editing it.

  • HELM_INSTALL_DIR changes the target directory
  • USE_SUDO=false skips sudo for user-owned paths
  • VERIFY_SIGNATURES=true adds a GPG check on top of the checksum
  • --version v4.x.y installs a specific release

We would turn on VERIFY_SIGNATURES on any shared build host, because a checksum fetched from the same CDN as the tarball only proves the download wasn’t corrupted. It doesn’t prove who built it, and the extra GPG step costs a few seconds on a host that runs a pipeline hundreds of times a week.

Install the Helm binary from the release tarball

Some teams don’t allow piping scripts on servers, and that’s a fair policy. The manual route is the same download the script does, done by hand, so you can review each step. We read the latest version from the same endpoint the script uses, which keeps the commands working after the next release instead of pinning you to an old build.

HELM_VERSION=$(curl -fsSL https://get.helm.sh/helm4-latest-version)
cd /tmp
curl -fsSLO https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz
curl -fsSLO https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz.sha256sum
sha256sum -c helm-${HELM_VERSION}-linux-amd64.tar.gz.sha256sum
tar -xzf helm-${HELM_VERSION}-linux-amd64.tar.gz
sudo install -m 0755 linux-amd64/helm /usr/local/bin/helm
helm version --short

The checksum line must say OK before you trust the binary. If it says FAILED, delete the tarball and download again rather than installing it anyway.

helm-v4.3.2-linux-amd64.tar.gz: OK
v4.3.2+g8346aaa

On ARM servers, swap linux-amd64 for linux-arm64 in all three places. Distro packages exist too (the Buildkite apt repo, Fedora’s dnf, snap), but the Helm docs list them as community builds that can lag a release behind. We stick to the official tarball on servers because the version you get is the version the Helm team signed.

Install Helm on macOS

Homebrew users can run brew install helm and be done, and that is the easiest path for a personal laptop. We wanted the official build on our Apple silicon Mac without touching shared system paths, so we used the same script with two variables. It installs into a directory you own and never asks for sudo, which also suits locked-down corporate Macs where you have no admin rights.

mkdir -p ~/install-helm-kubernetes/bin
cd ~/install-helm-kubernetes
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-4
chmod 700 get_helm.sh
HELM_INSTALL_DIR=$HOME/install-helm-kubernetes/bin USE_SUDO=false ./get_helm.sh
export PATH=$HOME/install-helm-kubernetes/bin:$PATH

The script detected the platform and pulled the darwin-arm64 build.

Downloading https://get.helm.sh/helm-v4.3.2-darwin-arm64.tar.gz
Verifying checksum... Done.
Preparing to install helm into /Users/josphat/install-helm-kubernetes/bin
helm installed into /Users/josphat/install-helm-kubernetes/bin/helm

The tarball method works on macOS too. The one difference from Linux is the checksum tool, because macOS ships shasum instead of sha256sum.

HELM_VERSION=$(curl -fsSL https://get.helm.sh/helm4-latest-version)
curl -fsSLO https://get.helm.sh/helm-${HELM_VERSION}-darwin-arm64.tar.gz
curl -fsSLO https://get.helm.sh/helm-${HELM_VERSION}-darwin-arm64.tar.gz.sha256sum
shasum -a 256 -c helm-${HELM_VERSION}-darwin-arm64.tar.gz.sha256sum
tar -xzf helm-${HELM_VERSION}-darwin-arm64.tar.gz
install -m 0755 darwin-arm64/helm ~/install-helm-kubernetes/bin/helm

Intel Macs use darwin-amd64 instead. To drive the cluster from the Mac, copy /etc/rancher/k3s/k3s.yaml off the node and change server: https://127.0.0.1:6443 to the node’s address. That file holds a cluster admin certificate, so keep it at mode 600 and open port 6443 on the node’s firewall only to your own IP.

scp [email protected]:/etc/rancher/k3s/k3s.yaml ~/install-helm-kubernetes/k8s01.yaml
sed -i '' 's/127.0.0.1/10.0.1.50/' ~/install-helm-kubernetes/k8s01.yaml
chmod 600 ~/install-helm-kubernetes/k8s01.yaml

Point KUBECONFIG at the copy and list every release in the cluster.

export KUBECONFIG=$HOME/install-helm-kubernetes/k8s01.yaml
helm list -A

We took this capture at the end of the lab, so it already shows the web and api releases built later in this guide. On a fresh cluster you’d see only the Traefik and Gateway API charts k3s installs for itself. Because Helm keeps release state in Secrets inside the cluster rather than on your laptop, any client with the kubeconfig reads the same history, and a teammate can roll back a release you installed.

Helm 4 on an Apple silicon Mac listing releases on a remote k3s cluster

On macOS, Helm keeps its files under ~/Library rather than the XDG paths Linux uses. That matters when you go looking for a repo cache or a plugin directory, since the Linux paths in most guides simply don’t exist on a Mac.

helm env | grep -E "HELM_(CACHE_HOME|CONFIG_HOME|DATA_HOME|PLUGINS)"

These are the four paths on our Mac. Plugins and the repo index live under different parents, so a backup of Preferences/helm alone keeps your repo list but loses every plugin you installed.

HELM_CACHE_HOME="/Users/josphat/Library/Caches/helm"
HELM_CONFIG_HOME="/Users/josphat/Library/Preferences/helm"
HELM_DATA_HOME="/Users/josphat/Library/helm"
HELM_PLUGINS="/Users/josphat/Library/helm/plugins"

The rest of this guide runs on k8s01, but every command works the same from the Mac. The only thing that changes is latency, since each Helm call makes several round trips to the API server, and over a slow VPN that’s the reason --wait runs feel longer from a laptop.

Add chart repositories and search them

A chart repository is just an HTTP server holding an index.yaml, and helm repo add stores its name and URL locally. We use podinfo here because it is a small demo app whose chart is published both as a classic repo and as an OCI artifact, so the same chart covers both install styles. The Jetstack repo, which hosts cert-manager, shows that several repos can sit side by side.

helm repo add podinfo https://stefanprodan.github.io/podinfo
helm repo add jetstack https://charts.jetstack.io
helm repo update

Helm 4 dropped --no-update from helm repo add, and scripts that still pass it fail with Error: unknown flag: --no-update. After adding repos, search the local index with the version history included.

helm search repo podinfo --versions | head -6

Chart version and app version are separate columns because a chart can change without the app changing. When you pin a release in CI, pin the chart version, since that is what --version matches.

helm repo add, helm repo update and helm search repo with chart versions

helm search repo only sees repos you have added. To find charts you haven’t added yet, helm search hub queries Artifact Hub instead.

helm search hub podinfo --max-col-width 50

Two charts by that name came back, and only the first is the one we want. Always check the publisher in the URL before adding a repo from a hub search, because anyone can publish a chart with a familiar name.

URL                                               	CHART VERSION	APP VERSION	DESCRIPTION
https://artifacthub.io/packages/helm/podinfo/po...	6.17.0       	6.17.0     	Podinfo Helm chart for Kubernetes
https://artifacthub.io/packages/helm/flagger/po...	6.1.4        	6.1.3      	Flagger canary deployment demo application

Before installing anything, read the chart’s defaults. helm show values prints the full values file, and every key you can pass with --set or a values file comes from it.

helm show values podinfo/podinfo | grep -E "^(replicaCount|ui):" -A3

We change replicaCount and the ui block later in the upgrade step. Reading the defaults first saves guessing at key names, because a misspelled key in --set usually doesn’t raise an error. Unless the chart ships a values schema, Helm passes the unknown key along, no template reads it, and you deploy the default.

replicaCount: 1
logLevel: info
host: #0.0.0.0
backend: #http://backend-podinfo:9898/echo
--
ui:
  color: "#34577c"
  message: ""
  logo: ""

The default colour is the blue podinfo shows on its web page, and the message is empty. Both are easy to spot in the app’s JSON response, which is why we picked them to prove an upgrade reached the pods.

Deploy a chart with helm install

We pin an older chart version on purpose so there is something to upgrade to later. --create-namespace saves a kubectl step, and --wait holds the command until the Deployment is actually available. Without it, Helm 4 returns as soon as the API accepts the objects, which tells you very little about whether the app works.

helm install web podinfo/podinfo --version 6.16.0 --namespace demo --create-namespace --set replicaCount=2 --wait --timeout 5m #https://github.com/stefanprodan/podinfo/releases

Helm reports revision 1 and prints the chart’s NOTES. kubectl shows both replicas running about ten seconds later, which matches what --wait promised.

helm install podinfo chart with --wait and the resulting deployment, pods and service

List releases per namespace with helm list -n demo, or across the cluster with -A. helm status now prints the release’s resources by default, so the Helm 3 --show-resources flag is gone and passing it returns unknown flag. You get the full picture from one command.

helm status web -n demo

The RESOURCES block replaces a separate kubectl call. If a pod sits outside Running here, describe it with kubectl before touching the release.

NAME: web
LAST DEPLOYED: Thu Dec  3 07:04:42 2026
NAMESPACE: demo
STATUS: deployed
REVISION: 1
DESCRIPTION: Install complete
RESOURCES:
==> v1/Deployment
NAME          READY   UP-TO-DATE   AVAILABLE   AGE
web-podinfo   2/2     2            2           14s

==> v1/Pod(related)
NAME                          READY   STATUS    RESTARTS   AGE
web-podinfo-8c7cbdf68-hbzgl   1/1     Running   0          15s
web-podinfo-8c7cbdf68-wqf67   1/1     Running   0          15s

==> v1/Service
NAME          TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)             AGE
web-podinfo   ClusterIP   10.43.91.109   <none>        9898/TCP,9999/TCP   14s

Both pods are Running with zero restarts, and the Service is ClusterIP only. Reaching the app from outside the cluster takes an Ingress or a port-forward, which we use in the next step.

Upgrade a release with a values file

Long --set chains get hard to review, and they vanish from shell history the moment you need them. Put the overrides in a values file instead, so you can commit it next to your manifests and diff it in a pull request. Create the file.

vim ~/podinfo-values.yaml

Add three replicas, a custom UI message and colour, and resource requests.

replicaCount: 3
ui:
  message: "Deployed with Helm 4"
  color: "#2f6f4f"
resources:
  requests:
    cpu: 50m
    memory: 32Mi

Upgrade to the newer chart version with the file.

helm upgrade web podinfo/podinfo --version 6.17.0 -n demo -f ~/podinfo-values.yaml --wait #https://github.com/stefanprodan/podinfo/releases

Revision 2 lands with Upgrade complete, but one thing caught us here. The replicaCount=2 passed at install time is gone, because an upgrade that passes any -f or --set starts again from the chart defaults plus whatever you pass this time. Unless you add --reuse-values or --reset-then-reuse-values, a value you forgot to repeat silently falls back to the default. helm get values shows exactly what the release holds now.

helm get values web -n demo

Only the file’s values remain, which is the strongest argument for keeping every override in the file. A one-off --set during an incident is fine, but copy it into the values file the same day. Otherwise the next routine upgrade quietly reverts it, and nobody connects the outage to a flag typed weeks earlier.

USER-SUPPLIED VALUES:
replicaCount: 3
resources:
  requests:
    cpu: 50m
    memory: 32Mi
ui:
  color: '#2f6f4f'
  message: Deployed with Helm 4

Port-forward and query the app to confirm the new values reached the pods, not just the release record. The release record only shows what Helm sent, and a pod stuck on an old ReplicaSet would still report the old message.

kubectl -n demo port-forward deploy/web-podinfo 8080:9898 &
sleep 3
curl -s localhost:8080 | jq "{hostname, version, message, color}"

The message and colour from the values file come back from a running pod on the new app version.

{
  "hostname": "web-podinfo-7f6cb9785f-jnz8x",
  "version": "6.17.0",
  "message": "Deployed with Helm 4",
  "color": "#2f6f4f"
}

Stop the port-forward with kill %1 when you’re done, so it doesn’t hold port 8080 for the next test.

Roll back failed upgrades

To see the rollback path work, we pushed an image tag that does not exist. --rollback-on-failure is the Helm 4 name for --atomic, and it switches the wait strategy to the kstatus watcher automatically. That pairing matters, because a rollback can only trigger if Helm actually waits long enough to notice the failure.

helm upgrade web podinfo/podinfo -n demo -f ~/podinfo-values.yaml --set image.tag=9.9.9-missing --rollback-on-failure --timeout 90s

After 90 seconds the watcher gave up and Helm rolled back on its own. The kstatus message tells you which object stalled and how far it got (2 of 3 pods updated), so you know straight away it is a rollout problem rather than a template error.

Helm 4 upgrade failing a kstatus readiness check and rolling back with --rollback-on-failure

Revision 3 is marked failed and revision 4 is the automatic “Rollback to 2”. You can also roll back by hand to any revision in the history, which is how you undo an upgrade that deployed fine but behaves badly. Here we go back to the original install.

helm rollback web 1 -n demo --wait
helm history web -n demo --max 3

A rollback never rewrites history. It adds a new revision that copies the old one, so the failed attempt stays visible for whoever investigates later. Helm keeps ten revisions by default, which is plenty for most apps, but a chart you upgrade on every commit will push useful history out quickly. Raise --history-max on those releases if you want to see last week’s failures.

Rollback was a success! Happy Helming!
REVISION	UPDATED                 	STATUS    	CHART         	APP VERSION	DESCRIPTION
3       	Thu Dec  3 07:05:16 2026	failed    	podinfo-6.17.0	6.17.0     	Upgrade "web" failed: resource Deployment/demo/web-podinfo not ready. status: InProgress, message: Updated: ...
4       	Thu Dec  3 07:06:46 2026	superseded	podinfo-6.17.0	6.17.0     	Rollback to 2
5       	Thu Dec  3 07:07:03 2026	deployed  	podinfo-6.16.0	6.16.0     	Rollback to 1

Old pipelines that still pass --atomic keep working for now. Helm 4 accepts it and prints Flag --atomic has been deprecated, use --rollback-on-failure instead, so fix the flag before Helm 5 removes it.

Install charts from an OCI registry

More projects now publish charts only to OCI registries such as GHCR, Docker Hub or ECR, so you’ll meet this format sooner or later. There’s no helm repo add step. You reference the chart by its oci:// URL wherever a chart name would go, and Helm pulls it like a container image.

helm show chart oci://ghcr.io/stefanprodan/charts/podinfo --version 6.17.0 #https://github.com/stefanprodan/podinfo/releases

Helm pulls the artifact first and prints its digest. That digest is the value to pin in production, because a tag can be pushed again but a digest can’t.

Pulled: ghcr.io/stefanprodan/charts/podinfo:6.17.0
Digest: sha256:258d0da545724b4eea8de5d5e724cd9a75aab3de79a87ba8d82ec402745cea58
apiVersion: v1
appVersion: 6.17.0
description: Podinfo Helm chart for Kubernetes
home: https://github.com/stefanprodan/podinfo
kubeVersion: '>=1.23.0-0'
name: podinfo
version: 6.17.0

Install straight from the registry. Helm 4 also accepts oci://...podinfo@sha256:<digest> and refuses a chart whose digest doesn’t match.

helm install api oci://ghcr.io/stefanprodan/charts/podinfo --version 6.17.0 -n oci-demo --create-namespace --wait #https://github.com/stefanprodan/podinfo/releases

The release is deployed like any repo chart, and from here on upgrades, history and rollback work the same way. The one thing to remember is that every upgrade needs the full oci:// URL again, since there’s no repo alias to fall back on, so keep it in a variable or a Makefile rather than retyping it.

Pulled: ghcr.io/stefanprodan/charts/podinfo:6.17.0
Digest: sha256:258d0da545724b4eea8de5d5e724cd9a75aab3de79a87ba8d82ec402745cea58
NAME: api
LAST DEPLOYED: Thu Dec  3 07:07:28 2026
NAMESPACE: oci-demo
STATUS: deployed
REVISION: 1
DESCRIPTION: Install complete

To keep a copy for air-gapped installs or review, helm pull with the same oci:// URL and --version saves the .tgz (18 KB here) in the current directory. Private registries need helm registry login ghcr.io first. Use the bare hostname there, because Helm 4 expects only the registry domain in registry login and older notes often show a full URL. In CI, feed the token with --password-stdin so it never shows up in the job log or the process list.

Handle server-side apply conflicts

Helm 3 computed a three-way merge patch on the client. Helm 4 uses Kubernetes server-side apply for new releases instead, so the API server records which manager owns each field. You can see that ownership on our web release, where Helm holds the spec through an Apply operation and k3s only updates status.

kubectl -n demo get deploy web-podinfo -o jsonpath="{range .metadata.managedFields[*]}{.manager}{\"\t\"}{.operation}{\"\n\"}{end}"

The Deployment has two field managers. Helm owns everything it rendered from the chart, and k3s only writes the status block, so as long as nobody else edits the spec, upgrades go through exactly as they did on Helm 3.

helm	Apply
k3s	Update

The upside shows when someone else touches a field Helm manages. We simulated an on-call engineer scaling the Deployment by hand during an incident, using a named field manager so the owner is easy to spot. Then we ran an ordinary upgrade on top of it.

kubectl -n demo patch deploy web-podinfo --field-manager=ops-hotfix -p '{"spec":{"replicas":4}}'
helm upgrade web podinfo/podinfo -n demo --set replicaCount=2

Helm 3 would have reset replicas to 2 without a word. Helm 4 refuses and names both the field and its owner, which gives you a chance to ask why the hotfix exists before you undo it. Once you have confirmed it can go, --force-conflicts takes ownership back.

Helm 4 server-side apply conflict on spec.replicas resolved with --force-conflicts

Two rules decide which apply method a release uses, and the second one surprises people moving from Helm 3.

  1. New installs default to --server-side=true
  2. Upgrades and rollbacks keep the method the release already used

So releases created by Helm 3 stay on client-side apply after you move to Helm 4, and you only get conflict detection on them if you pass --server-side=true explicitly. The reverse also works. A new install with --server-side=false uses the old method, and in our lab that Deployment showed helm Update instead of helm Apply. We’d switch old releases over deliberately, one at a time, after checking which fields HPAs or operators already manage, because the first server-side upgrade is where those hidden owners surface as conflicts.

Choose a –wait strategy

In Helm 4, --wait takes a value. Leaving the flag off now has a name, hookOnly, which waits for hook Pods and Jobs and nothing else, the same as Helm 3 without --wait, so a release can be marked deployed while its pods are still crash looping. These are the three strategies listed by helm install --help.

FlagStrategyWhat Helm waits for
(omitted)hookOnlyHook resources only; the release is marked deployed as soon as objects are accepted
--wait or --wait=watcherwatcherEvery resource reaching Current status in kstatus, watched through the API
--wait=legacylegacyThe Helm 3 polling readiness checks

The difference shows right after an install. Without --wait, Helm reported the release deployed while its pod was still pulling an image.

helm install quick podinfo/podinfo -n wait-demo --create-namespace
kubectl -n wait-demo get pods

The pod is at 0/1 while Helm already says deployed. Here that’s harmless, because the image pull finished a few seconds later, but a pipeline would have reported success just as happily for a pod that never starts.

NAME                             READY   STATUS              RESTARTS   AGE
quick-podinfo-5487444fdd-7mqlw   0/1     ContainerCreating   0          0s

With the watcher, the same chart took 12 seconds to return, and by then the pod was serving. In CI, always pass --wait so a green pipeline means a working app rather than an accepted manifest. Add --wait-for-jobs when the chart runs database migrations as Jobs, because otherwise the app can start before its schema exists.

time helm install slow podinfo/podinfo -n wait-demo --wait=watcher --timeout 3m

Here is the timing from our run, almost all of it spent pulling the container image.

STATUS: deployed
REVISION: 1

real	0m12.105s
user	0m0.333s
sys	0m0.074s

Twelve seconds is a fair price for knowing the pod actually serves traffic. For big charts, set --timeout above the slowest rollout you expect, since the default is five minutes.

Install plugins under the Helm 4 plugin system

Helm 4 verifies plugin signatures before installing, and that check is on by default. Git URLs cannot carry a signature, so the classic one-liner from older guides now stops right away.

helm plugin install https://github.com/databus23/helm-diff

The error is explicit about the way out. Nothing gets installed, so a script that ignored the exit code would carry on without the plugin it expected.

Error: plugin source does not support verification. Use --verify=false to skip verification

Adding --verify=false installs it, but read the plugin’s code first. A subprocess plugin runs with your user’s full rights and your kubeconfig, so a malicious one can do anything you can do to the cluster. Signed tarballs are the better habit. To show that path end to end, we built a tiny plugin in the new apiVersion: v1 format, signed it and installed it with verification on.

Write a cli/v1 plugin

A plugin is a directory with a plugin.yaml. Create the directory and the manifest.

mkdir -p ~/plugins/releases
vim ~/plugins/releases/plugin.yaml

Four keys are new in Helm 4, and old Helm 3 manifests without apiVersion still load as legacy plugins until Helm 5.

  • type: cli/v1, getter/v1 or postrenderer/v1
  • runtime: subprocess, or extism/v1 for Wasm
  • config: help text and flag handling
  • runtimeConfig: the command to run per platform

Paste the manifest we used.

apiVersion: v1
type: cli/v1
name: releases
version: 0.1.0
runtime: subprocess
config:
  usage: releases
  shortHelp: List releases in every namespace with their chart
  longHelp: Prints name, namespace, chart and status for each release in the cluster
runtimeConfig:
  platformCommand:
    - command: ${HELM_PLUGIN_DIR}/releases.sh

Then write the script it calls, saved as ~/plugins/releases/releases.sh. Helm exports HELM_BIN, so the plugin uses the same binary and kubeconfig you invoked rather than whatever helm is first on the PATH. The -N header option is util-linux column, so on macOS drop it and print the header with echo instead.

#!/bin/sh
"$HELM_BIN" list --all-namespaces --output json |
  jq -r ".[] | [.name, .namespace, .chart, .status] | @tsv" |
  column -t -N RELEASE,NAMESPACE,CHART,STATUS

Make it executable and install the directory. A local path installs in development mode as a symlink, with no signature check, so edits to the script take effect immediately.

chmod +x ~/plugins/releases/releases.sh
helm plugin install ~/plugins/releases
helm plugin list

The PROVENANCE column says local dev. On a shared machine, that is exactly the value a reviewer should question.

Installing plugin from local directory (development mode)
Installed plugin: releases
NAME    	VERSION	TYPE  	APIVERSION	PROVENANCE	SOURCE
releases	0.1.0  	cli/v1	v1        	local dev 	unknown

Development mode is the right way to iterate on a plugin, and the wrong way to ship one. The next step turns the same directory into a signed package.

Sign and verify the plugin package

Plugin signing uses the same OpenPGP provenance files as chart signing. Helm reads keys from the legacy keyring format, which modern GnuPG no longer writes by default, so we exported the signing key into secring.gpg and the public half into a separate keyring that readers of your plugin would receive.

helm plugin uninstall releases
gpg --batch --passphrase "" --quick-gen-key "Josphat Lab <[email protected]>" ed25519 sign never
gpg --export-secret-keys > ~/.gnupg/secring.gpg
gpg --export > ~/helm-plugin-signers.gpg

An empty passphrase is fine in a lab, but in CI use a protected key with --passphrase-file. Package and sign the directory.

cd ~/plugins
helm plugin package releases --key "Josphat Lab" --keyring ~/.gnupg/secring.gpg --destination ~/dist

Helm writes the tarball and its .prov file side by side. Publish both, since the install fails without the provenance file next to the tarball.

Successfully signed. Signature written to: /home/josphat/dist/releases-0.1.0.tgz.prov
Successfully packaged plugin and saved it to: /home/josphat/dist/releases-0.1.0.tgz

Install the tarball with the public keyring. Verification is on by default, so there is no flag to add.

helm plugin install ~/dist/releases-0.1.0.tgz --keyring ~/helm-plugin-signers.gpg
helm plugin list
helm releases

Helm checked the signer and the hash before installing. PROVENANCE now reads signed, and the new helm releases subcommand lists every release in the cluster.

Signed Helm 4 plugin installed with signature verification and listed as signed

You can re-check any package later with helm plugin verify ~/dist/releases-0.1.0.tgz --keyring ~/helm-plugin-signers.gpg. That is useful in audits, when someone installed a plugin with --verify=false during development and nobody remembers which one. The Helm plugins overview covers the Wasm runtime and the getter and postrenderer plugin types.

Remove releases and Helm itself

helm uninstall accepts several release names at once. With --wait, it waits for the release’s objects to go away, and adding --cascade foreground also waits for dependents such as pods and anything held by finalizers. That matters when a script recreates the same names right after.

helm uninstall quick slow -n wait-demo --wait

Both releases go in one call. The namespace survives, though, because Helm never owned it, even though --create-namespace made it.

release "quick" uninstalled
release "slow" uninstalled

Uninstalling deletes the release’s history Secrets too, so pass --keep-history if you might need helm rollback afterwards. A few things stay behind after an uninstall, and they are worth cleaning up by hand.

  • Namespaces made by --create-namespace
  • CRDs that a chart installed from its crds/ folder
  • PersistentVolumeClaims created by StatefulSets

To remove Helm itself, delete the binary from /usr/local/bin and its data directories, the cache, config and data folders under your home on Linux, or the ~/Library paths shown earlier on macOS. Leaving the config folder behind is harmless if you plan to reinstall, because a new binary picks up the old repo list as it was. Plugins live in the data folder, so they go when you delete that one.

Helm 3 habits that break on Helm 4

Most of our lab errors came from muscle memory rather than the cluster. These are the ones that show up first when old scripts or old notes meet a new Helm, and each heading below is the exact error text you’ll see.

Error: unknown flag: –client

Helm 3 kept helm version --client around as a Helm 2 leftover, and Helm 4 finally removed it. Plain helm version prints the same client build information, so drop the flag from scripts and CI health checks.

Error: unknown flag: –no-update

The flag was already deprecated in Helm 3 and is removed in Helm 4. Delete it from helm repo add calls. If the goal was to overwrite an existing repo entry, the flag you want is --force-update.

Error: unknown flag: –show-resources

helm status prints the RESOURCES section by default in Helm 4, as shown above, so the flag has nothing left to do. Delete it. If you parse status output in scripts, switch to -o json rather than scraping the table, because table columns change between releases.

Error: UPGRADE FAILED: conflict occurred while applying object

Server-side apply found a field owned by another manager, such as a kubectl scale, an HPA or an operator. Read the manager name in the message and decide who should own the field. Then either remove it from your values or rerun with --force-conflicts. We wouldn’t add --force-conflicts to every pipeline by default, because that throws away the protection you just saw working.

Flag –atomic has been deprecated

It’s a warning, not a failure, and --force gets the same treatment in favour of --force-replace. Rename both now. GitOps tools that call Helm for you have their own quirks, which we hit while doing an Argo CD upgrade with Helm 4. For a first real chart after podinfo, our Argo CD install on Kubernetes and the JFrog Artifactory Helm deployment both start with helm install.

Keep reading

Best UI Applications for Managing Docker Containers Containers Best UI Applications for Managing Docker Containers Install Docker and Run Containers on Ubuntu 24.04|22.04 Containers Install Docker and Run Containers on Ubuntu 24.04|22.04 Install UniFi OS Server on Ubuntu 26.04 / 24.04 LTS Containers Install UniFi OS Server on Ubuntu 26.04 / 24.04 LTS Traefik 3.8 Upgrade: Breaking Changes, Yaegi v2 and Helm Test Containers Traefik 3.8 Upgrade: Breaking Changes, Yaegi v2 and Helm Test magpie: One AI Gateway for Claude Code and Codex on Linux AI magpie: One AI Gateway for Claude Code and Codex on Linux Setup Docker Container Registry with Podman & Let’s Encrypt SSL Containers Setup Docker Container Registry with Podman & Let’s Encrypt SSL

Leave a Comment

Press ESC to close