concept
Dry-run and structured output
A client preview does not demonstrate admission. Server dry-run exercises the request path without persisting the object. Inspect structured output and separately verify controller progress, readiness and application behavior. Diff exit status 1 reports a difference, not a command failure.
Formal Syntax & Structure
kubernetes syntaxkubernetes
kubectl apply --dry-run=server -f FILE -o yamlWorking Example
Example Snippetkubernetes
kubectl --kubeconfig ./approved-lab.kubeconfig --context bytemind-lab -n api-lab apply --dry-run=client -f desired.yaml -o yamlkubectl --kubeconfig ./approved-lab.kubeconfig --context bytemind-lab -n api-lab apply --server-side --field-manager=release-bot --dry-run=server -f desired.yaml -o yamlkubectl --kubeconfig ./approved-lab.kubeconfig --context bytemind-lab -n api-lab diff --server-side --field-manager=release-bot -f desired.yaml