Cloud / HELM Interview Questions
What is the difference between 'helm upgrade --install' and separate install/upgrade commands?
helm upgrade --install (or helm upgrade -i) is an idempotent Helm operation that installs if the release doesn't exist, or upgrades if it does. Essential for CI/CD pipelines where jobs run repeatedly.
Behavior comparison:
- Separate helm install: Fails with "already exists" if release exists
- Separate helm upgrade: Fails with "release: not found" if release doesn't exist
- helm upgrade --install: Checks existence - installs (revision 1) if not found, upgrades if found
Critical differences: upgrade --install merges new values with existing values from the last release, while install only uses provided values. This affects idempotency - omitted --set flags preserve old values rather than reverting to defaults.
Best practices for CI/CD: helm upgrade --install my-app ./mychart --namespace prod --create-namespace --wait --atomic --history-max 10 --atomic ensures rollback on failure.
Reset values when needed: helm upgrade --install --reset-values discards previous values - useful for major version changes.
More Related questions...