skip to content

In Helm 4, `--force-replace` and `--force-conflicts` cannot be combined — what does each one do?

level: middleimportance: should knowfreq 40%

answer

  1. Ask what the server actually objected to
  2. One dispute is about who, one about what
  3. An ownership dispute names another writer
  4. No writer can set an immutable value
  5. --force is the alias of the destructive one

basics

~20 s

--force-replace abandons updating an object and recreates it, which is how a change to a write-once field lands. --force-conflicts keeps the normal apply but overrides another field manager's ownership. Only the first clears an immutable-field failure.

solid answer

~50 s

They fix two failures that read similarly on the terminal and share nothing underneath. `--force-conflicts` belongs to Helm 4's server-side apply write path: the apply was refused because another manager owns a field Helm is setting, and the flag tells the server to hand ownership over. `--force-replace` is about the object itself: the API server will not accept a new value for a field that is fixed at creation, so Helm removes the object and creates it again. An immutable-field rejection is not an ownership dispute — nobody may set that value, whoever asks — so only replacement resolves it. Helm makes the pair mutually exclusive because one performs an apply and the other skips applying entirely. The trap is `--force`, which in Helm 4 is a deprecated alias of `--force-replace`, so typing it while thinking about conflicts gets you a destructive recreation.

go deeper

for a junior

Recall that Helm 4 has two similarly named flags and that only --force-replace has anything to do with a field that cannot change. Knowing that --force is its old name keeps you from typing the destructive one by accident.

for a middle

Explain the mechanism behind each: one settles which writer owns a field during an apply, the other abandons the apply and recreates the object. Say why immutability is not an ownership question and why Helm refuses both flags together.

for a senior

Demonstrate the diagnosis: read the refusal for whether a second writer is named, confirm with a server-side dry run, and then weigh whether the object can be absent at all before choosing recreation. Say what you would do instead when it cannot.

for a principal

Own the guardrail: teams reaching for a flag with force in the name during an incident is a predictable failure mode, so decide whether recreation is allowed outside a change window at all and what runbook text stands between an engineer and that flag.

### Two failures that look alike on the terminal An upgrade that will not go through produces a wall of API-server text either way, and the two Helm 4 flags with `force` in the name sit right next to each other in `helm upgrade --help`. Telling them apart is a matter of asking what the server actually objected to. **An ownership objection** says another manager is already setting this field and Helm's apply would take it over. This lives entirely in Helm 4's server-side apply write path, where each writer of a field is tracked, and it is a dispute about *who* sets the value. `--force-conflicts` settles it by making Helm take the field. **An immutability objection** says the field may not hold a different value than the one it was created with. It has nothing to do with who is asking; a human with cluster-admin rights writing the same change by hand gets the same refusal. No flag persuades the server, so the object has to stop existing and start again — which is `--force-replace`. The checkable difference: an ownership objection names a field manager, an immutability objection says the field is immutable. If in doubt, ask whether a second party is in the picture. If no other writer is involved and the value is simply not allowed to change, no amount of forcing an apply will help. ### Why Helm refuses both at once The two flags act at different points of the same operation. `--force-conflicts` is an instruction about how an apply resolves ownership. `--force-replace` says there will not be an apply — the object is removed and created anew. Passing both asks Helm to tune something it is not going to do, so rather than quietly picking one, Helm rejects the combination. That mutual exclusion is worth remembering as a mnemonic in itself: if the two could sensibly be combined they would be solving related problems, and they are not. ### The alias trap Helm 4 renamed the old Helm 3 flag: `--force-replace` is the current name and `--force` is a deprecated alias for it. Meanwhile server-side apply became the default write path in Helm 4, so ownership conflicts appear in situations where a Helm 3 user never saw them. The result is a genuine footgun: an engineer hits a conflict for the first time, remembers that Helm has a flag with `force` in it, types `--force`, and instead of overriding an ownership conflict deletes and recreates the object — with the outage that implies. The two words that follow `force` are the entire difference between a metadata adjustment and a restart. ### A concrete pairing One cluster, two failing releases of the same third-party ingress-controller chart at 4.12.0. The first fails because a controller in the cluster has been writing an annotation into an object the chart also renders, so the apply is refused over ownership of that field. Nothing about the object needs recreating; the fix is to decide who should own the annotation. If the chart should own it, `--force-conflicts` takes it; if the other controller should, the chart should stop rendering it. Either way, no restart. The second fails because the chart version rewrote the helper feeding the selector, and the release name — 71 characters, truncated to 63 by the chart's name helper — now truncates to a different value. That is immutability. `--force-conflicts` changes nothing, because there is no second writer; the object must be recreated, or the change must be avoided by pinning the values that feed the selector. ### Diagnosing before choosing A server-side dry run is the cheap way to get both answers before committing: it puts the rendered objects through the API server's validation and reports what it would refuse and why. Read the refusal for the word that identifies the class — a named field manager, or immutability — and pick the flag from that, not from which one you remember. And when the answer is `--force-replace`, stop and ask whether the workload can be absent for a moment before you type it, because that flag's cost is invisible in the command and very visible in the graphs.

  • How do you tell from the failure output which of the two flags applies?
    Read what the server objected to. If the message identifies another field manager already holding a field, it is an ownership dispute and `--force-conflicts` is the relevant flag. If it says the field is immutable, no writer may set that value and only recreating the object helps. A server-side dry run gets you the same message without committing the change.
  • Why is `--force` a particular hazard for someone coming from Helm 3?
    In Helm 4 it is a deprecated alias for `--force-replace`, so it deletes and recreates. At the same time Helm 4 made server-side apply the default, so ownership conflicts now appear where a Helm 3 user never met them. Someone reaching for the flag whose name they half-remember gets a recreation and an outage instead of a metadata adjustment.

saying these in an interview costs you the question

  • Says --force-conflicts can clear an immutable-field rejection
  • Treats the two flags as different names for one behaviour
  • Thinks --force-replace resolves field-manager ownership
  • Assumes passing both flags together simply picks the stronger
  • Claims cluster-admin rights let you update an immutable field

context