I've created a label with:
kubectl label pods <pod id> color=green
but removing it using:
kubectl label pods bar -color
gives:
unknown shorthand flag: 'c' in -color
Any suggestions?
The dash goes at the end of the label name to remove it, per kubectl help label
:
# Update pod 'foo' by removing a label named 'bar' if it exists.
# Does not require the --overwrite flag.
kubectl label pods foo bar-
So try kubectl label pods bar color-
.