Replace an object using the manifest definition.
Section: Declarative Apply, Edit, and Replace
Replace resource from file
bash
bash
kubectl replace -f deployment.yamlExplanation
Replace an object using the manifest definition.
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 Declarative Apply, Edit, and Replace