Install-or-Upgrade with --install
The idempotent upgrade -i pattern for automation.
Install-or-Upgrade with --install is a free Helm Academy lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Helm Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
The Chicken-and-Egg Problem
Plain helm upgrade fails if the release does not exist yet. In automation you often cannot be sure whether it is the first run or the tenth.
Meet --install
The --install flag fixes this: upgrade the release if it exists, otherwise install it fresh. One command covers both cases.
helm upgrade --install my-app bitnami/nginxThe Short Form -i
You will see this written as -i, the short alias for --install. The two forms behave identically.
helm upgrade -i my-app bitnami/nginxWhy It Means Idempotent
Run it once or run it ten times with the same inputs and you converge to the same state. That idempotent behavior is gold for scripts.
Built for Pipelines
CI/CD jobs cannot branch on whether a release already exists. With upgrade --install, the same deploy step works on every run. 🤖
Values Still Apply
All the usual flags work here. Combine --set or -f exactly as you would with a normal install or upgrade.
helm upgrade -i my-app bitnami/nginx -f prod-values.yamlCreate the Namespace Too
On a first install the target namespace may not exist. Add --create-namespace so the very first run never trips over a missing namespace.
helm upgrade -i my-app bitnami/nginx -n web --create-namespacePair It With --atomic
For safe automated deploys, combine --atomic with --install so a failed run cleans up after itself on either path.
helm upgrade -i my-app bitnami/nginx --atomicFirst Run Is Revision 1
When --install actually installs, that counts as revision 1, just like a normal helm install. Later runs upgrade and bump the number.
Still Preview With --dry-run
Unsure what an automated step will do on a fresh cluster? Add --dry-run to see the rendered result without touching anything.
helm upgrade -i my-app bitnami/nginx --dry-runA Common One-Liner
This single, repeatable command is the backbone of many deploy scripts: it installs or upgrades, creates the namespace, and self-heals on failure. ✅
helm upgrade -i my-app ./chart -n web --create-namespace --atomicQuick Check
Your deploy job runs the same command on a brand-new cluster and on an existing one. What does helm upgrade --install do?
Recap
You learned the idempotent upgrade --install (or -i) pattern: one command that installs or upgrades, perfect for automation. Add --create-namespace and --atomic for robustness. 🚀
Frequently asked questions
Is the “Install-or-Upgrade with --install” lesson free?
Yes — the full text of “Install-or-Upgrade with --install” is free to read here on the web, and the Helm Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Helm Academy course, upgrade to CoddyKit PRO.
What will I learn in “Install-or-Upgrade with --install”?
The idempotent upgrade -i pattern for automation. You practise Helm Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Helm Academy?
No prior experience is required. Helm Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Install-or-Upgrade with --install” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Helm Academy lesson?
Yes. Every Helm Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Apply Changes with helm upgrade
- Install-or-Upgrade with --install
- Reviewing helm history
- Reverting with helm rollback