With command, I can add label as below
kubectl label pod POD_NAME KEY1=VALUE1
How could I do that from kubernetes API?
I guess it c
Set content-type to application/json-patch+json and specify the patch in http://jsonpatch.org format.
application/json-patch+json
$ cat > patch.json <