Validate a manifest against the API server without persisting it.
Section: YAML Validation and Troubleshooting
Server-side dry run
bash
bash
kubectl apply --dry-run=server -f deployment.yaml -o yamlExplanation
Great for CI and schema validation when the cluster has the CRDs and admission rules you care about.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing YAML Validation and Troubleshooting