Kubectl patch: Difference between revisions
Jump to navigation
Jump to search
Line 9: | Line 9: | ||
=Usage Examples= | =Usage Examples= | ||
==Delete a Field== | ==Delete a Field== | ||
Unbind a PVC from a PV by deleting the PV's <code>claimRef</code> | Unbind a PVC from a PV by deleting the PV's <code>claimRef</code>: | ||
<syntaxhighlight lang='bash'> | <syntaxhighlight lang='bash'> | ||
kubectl patch pv my-pv --type=json -p='[{"op": "remove", "path": "/spec/claimRef"}]' | kubectl patch pv my-pv --type=json -p='[{"op": "remove", "path": "/spec/claimRef"}]' | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 19:00, 17 May 2021
External
Internal
Overview
kubectl patch
supports strategic merge patch.
Usage Examples
Delete a Field
Unbind a PVC from a PV by deleting the PV's claimRef
:
kubectl patch pv my-pv --type=json -p='[{"op": "remove", "path": "/spec/claimRef"}]'