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> | |||
<syntaxhighlight lang='bash'> | <syntaxhighlight lang='bash'> | ||
kubectl patch pv my-pv -p '{"spec | kubectl patch pv my-pv --type=json -p='[{"op": "remove", "path": "/spec/claimRef"}]' | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 18:59, 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"}]'