Commands.app

kubectl label

Labels & Annotations

Add or update labels

Examples
Common usage examples

Add label to pod

kubectl label pods mypod env=production

Remove label

kubectl label pods mypod env-

Label all pods

kubectl label pods --all env=test

Update existing label

kubectl label pods mypod env=staging --overwrite
Notes
  • Labels are key-value pairs for organization
Related Commands
You might also find these useful