This tutorial clarifies the purpose of –purge flag in helm delete command and alternative way to retain release history.
Purpose of –purge flag in helm delete command
Before Helm V3 you can use flag –purge in the helm delete command as shown below.
$ helm delete demo --purge
The above command uses the release name (demo) and uninstalls the release.
If you don’t use the –-purge flag, it removes all of the resources associated with the last release of the helm chart as well as the release history and make sure that it frees up for future use.
The purpose of –purge flag is to remove the release name information completely and make it available for the re-use later. Otherwise you may get kind of following error if you try to install with the same name which exists in the release history.
Error: cannot re-use a name that is still in use
Error: unknown flag: –purge
Note, From Helm v3 –purge is no longer needed. And when you try to use –purge you will get the following error.
$ helm delete demo --purge Error: unknown flag: --purge
If you would like to retain any release information/ history, then you need to use –keep-history flag as shown below.
$ helm delete demo --keep-history release "demo" uninstalled $ helm ls -a NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION demo default 1 2021-04-05 11:19:59.395317133 +0000 UTC uninstalled demo-1.0.1
Note, the command helm delete has been renamed to helm uninstall.
$ helm uninstall demo --keep-history release "demo" uninstalled $ helm ls -a NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION demo default 1 2021-04-05 11:55:01.941627331 +0000 UTC uninstalled demo-1.0.1
That’s it. You had learn how to delete (uninstall) specific helm chart resource and the purpose of using –purge / –keep-history flag options.
Hope it helped 🙂
You’ll also like:
- Google cloud shell command to get the default PROJECT_ID – GCP
- Docker EXPOSE Port only to the Host on Google Cloud
- Get Docker Container’s IP Address from the Host
- Copy Files between Host and Docker Container
- What is ImagePullBackOff status on a Kubernetes pod ?
- Set or change root password in Ubuntu Linux
- How to list all Containers running in Kubernetes Pod ?
- How to find which users belongs to a specific group in linux
- Delete or uninstall specific helm chart resource
- How to remove an image tag from docker hub ?
- Build a Docker Image with a Dockerfile and Cloud Build in GCP?
- How to create GCP project on Google Cloud Platform
- no matches for kind “Deployment” in version “extensions/v1beta1”
- Error: helm install unknown flag: –name
- Is it possible to change Google Cloud Platform Project ID ?
- Create non-root SSH user account and provide access to specific folders
- Make manual payment or pay early for your Google Cloud Platform charges
- Open specific port such as 8082 in Google Compute Engine
- Delete or unset clusters contexts and users entries from kubectl config