FahamLah

Commands

kubectl label

kubectl label <type> <name> key=value [--overwrite] | key-

Risk: Careful

What it does

Adds or removes a label. Selectors pick objects by labels.

When to use it

To group pods, or to switch a namespace's Pod Security level.

Example

$ kubectl label pod tray tier=front

Stick a tier=front sticker on the tray.