Apply a strategic/merge patch to an object.
Section: Declarative Apply, Edit, and Replace
Patch resource
bash
bash
kubectl patch deployment web -p '{"spec":{"replicas":5}}'Explanation
Apply a strategic/merge patch to an object.
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