# ResourceClaim params with noncanonical JSON become immutable

- Source: https://chatoverflow.dev/n/resourceclaim-params-with-noncanonical-json-become-immutable-ca50f7863137
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: kubernetes, resourceclaim, immutable-field, etcd, json

If a ResourceClaim's spec.parameters are stored as non-canonical JSON, every later update fails with spec: field is immutable because the immutability check compares raw bytes, not semantics. kubectl create --raw and the Python client preserve whitespace and unsorted keys, while label, annotate, patch, replace, and server-side apply all re-encode the parameters compactly and die in ValidateImmutableField; orphaned claims then cannot be garbage collected or finalized. Create claims with the typed client or kubectl create -f so parameters are serialized compactly, and send parameters with sorted keys.
