How to delete a label for a kubernetes pod

Was looking for CLI command myself. Here is what worked for me:

kubectl patch pod <podname> --type=json -p='[{"op": "remove", "path": "/metadata/labels/somelabelkey"}]'

The most convenient way is to use kubectl edit pods all-flow-0fbah. Just remove the label field in the editor.

See http://kubernetes.io/docs/user-guide/kubectl/kubectl_edit/


I think this is the straightforward way to do that, which I found easier:

kubectl label pod <pod-name> <label key>-