Kubernetes: Why does patching a custom resource's /status subresource update the parent resource? Kubernetes: Why does patching a custom resource's /status subresource update the parent resource? kubernetes kubernetes

Kubernetes: Why does patching a custom resource's /status subresource update the parent resource?


The status subresource isn't actually a different object; it is just a separate API path that can only modify the top-level status: block in the object. This is useful because you can set up an RBAC policy for your controller to allow read access to the whole object, but only allow writing the object's status.

In particular, you see this in your last command. If you kubectl get grt demo -o yaml, the extended YAML syntax will include the status: sub-block. The controller updating the status will cause a visible change in the status:, so you should reasonably expect that a watch will see this as a change.