Apply an RFC 6902 JSON patch.
Section: Declarative Apply, Edit, and Replace
JSON patch resource
bash
bash
kubectl patch deployment web --type='json' -p='[{"op":"replace","path":"/spec/replicas","value":5}]'Explanation
Apply an RFC 6902 JSON patch.
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