Last active
March 7, 2023 14:00
-
-
Save epequeno/43966dbb255c1805a3a49fd34bc18802 to your computer and use it in GitHub Desktop.
use httpie to PATCH k8s
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# example derived from https://kubernetes.io/docs/tasks/administer-cluster/extended-resource-node/ | |
NODE_NAME="foo" | |
URL="localhost:8001/api/v1/nodes/${NODE_NAME}/status Content-Type:application/json-patch+json" | |
DATA='[{"op": "add", "path": "/status/capacity/example.com~1dongle", "value": "4"}]' | |
echo -n "${DATA}" | http PATCH "${URL}" | |
# or | |
http PATCH "${URL}" <<< "${DATA}" | |
# or | |
http PATCH "${URL}" --raw "${DATA}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment