
spec. If only two Pods are ready right now, that belongs in status. Without exposing status, a custom resource can look successful while hiding important details.
A WebApp object might exist and the controller might have created a Deployment, yet the Pods could still be pulling an image, a Pod could be crashing, or the Deployment might be pending due to cluster capacity.

status.availableReplicas and status.conditions so users inspect the Deployment object when they care about the workload.
Example Deployment status:
kubectl get deploy, kubectl describe pod, and controller logs. Another controller, a GitOps tool, or an alerting rule needs a stable API field — such as status.readyReplicas or a Ready condition — to make decisions without understanding every child object your operator manages.

status. This enforces the core rule: status is derived from the real cluster state. Do not guess it or copy it from spec unless the cluster actually matches the requested state.

spec update changes the desired state; a status update reports what the controller observed. Kubernetes exposes these as separate update paths so a user changing spec and the controller updating status do not overwrite each other.
In controller code you should use the status client to write status:
status block disappeared and the controller reconciled again, it must be able to inspect the cluster and write the same answer. This keeps the operator honest: the source of truth is spec plus the real child resources, not some ephemeral controller memory.

Status must be derivable from cluster state alone. Avoid storing ephemeral controller memory in
status. If a controller restarts, it should be able to recompute status from the child resources and spec.status with a condition:
When the controller observes cluster state, set an appropriate condition and update
status atomically via the status subresource. In Go, using metav1.Condition:
- Export observed state on the custom resource so humans and automation can rely on a single API surface.
- Update status via the status subresource to avoid conflicting writes with user-driven
specchanges. - Make status rebuildable from
specand child resources — the controller must be able to recompute it after restart. - Use conditions to give numeric status fields clear, machine- and human-readable semantics.
- Kubernetes CustomResourceDefinition (CRD) and subresources
- Controller pattern and best practices
- Conditions and status conventions
- sigs.k8s.io/controller-runtime