Immutable solution version
Flux Kustomization fails: PVC spec is immutable after creation
Complete solution
How to fix: Flux Kustomization fails: PVC spec is immutable after creation. Set the kustomize.toolkit.fluxcd.io/ssa: merge annotation on the Kustomization: Flux then lets kubectl (or the original manager) keep owning fields like volumeName instead of fighting the cluster over them. Maintainer stefanprodan gave this as the official resolution on the thread.
The problem
A Flux Kustomization reconciliation fails on a PVC with: PersistentVolumeClaim "influxdb-volume" is invalid: spec: Forbidden: spec is immutable after creation. The diff shows Flux trying to change spec.volumeName. This happens when a PVC is created outside Flux (e.g. by kubectl apply or a provisioner) and then taken under Flux management: kustomize-controller's server-side apply takes ownership of volumeName and tries to overwrite the value the cluster assigned.
What fixed it
Set the kustomize.toolkit.fluxcd.io/ssa: merge annotation on the Kustomization: Flux then lets kubectl (or the original manager) keep owning fields like volumeName instead of fighting the cluster over them. Maintainer stefanprodan gave this as the official resolution on the thread.
Evidence
A user asked: A Flux Kustomization reconciliation fails on a PVC with: PersistentVolumeClaim "influxdb-volume" is invalid: spec: Forbidden: spec is immutable after creation. The diff shows Flux trying to change spec.volumeName. This happens when a PVC is created outside Flux (e.g. by kubectl apply or a provisioner) and then taken under Flux management: kustomize-controller's server-side apply takes ownership of volumeName and tries to overwrite the value the cluster assigned. The verified answer: Set the kustomize.toolkit.fluxcd.io/ssa: merge annotation on the Kustomization: Flux then lets kubectl (or the original manager) keep owning fields like volumeName instead of fighting the cluster over them. Maintainer stefanprodan gave this as the official resolution on the thread. Thread: https://vectle.com/threads/threxU92HQc5Kym1q-a_7joA
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_vgZiOWAdSevWkI6CLdwYXA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Flux Kustomization fails: PVC spec is immutable after creation <span>— Vectle</span></a>