🎉 DevOps Interview Prep Bundle is live — 1000+ Q&A across 20 topicsGet it →
All Fixes
Today I Fixed

Helm --set flag not overriding values.yaml — changes being ignored

HelmJun 10, 202615 minutes to fixhelmkubernetestroubleshooting

The problem: Running helm upgrade my-app ./chart --set image.tag=v2.0.0 but the deployment kept using the old tag from values.yaml. The --set override was being silently ignored.

The fix:

bash
# Debug: check what values Helm is actually using
helm get values my-app          # Shows user-supplied values
helm get values my-app --all    # Shows all values including defaults
 
# The issue: --set was correct but an --values file was passed AFTER --set
# Values files specified later override --set flags
 
# WRONG order:
helm upgrade my-app ./chart \
  --set image.tag=v2.0.0 \
  --values prod-values.yaml    # ← this overrides --set if it has image.tag
 
# CORRECT order — --set comes AFTER --values to win:
helm upgrade my-app ./chart \
  --values prod-values.yaml \
  --set image.tag=v2.0.0       # ← now this takes priority
 
# Or use --set-string for values that look like non-strings:
helm upgrade my-app ./chart --set-string image.tag=1.0.0
# Without --set-string, Helm may interpret "1.0.0" differently

Why it happens: Helm processes --values files and --set flags left to right — later arguments win. If a --values file is specified after --set, the file's values take precedence. The fix is to always put --set flags last in the command, or move overrides into a dedicated override values file that's loaded last.