kubectl label
CautionAdd/remove labels
kubectl label <kind>/<name> key=value
Manages labels (key- removes). Stripping a label quietly pulls a pod out of its Service — a neat quarantine trick.
Examples
kubectl label pod web-abc app-Detach a pod from its Service
Syntax
kubectl label <res> key=value [key-]
Before you run it
Label edits change selector matches.
Related commands
- kubectl get podsList pods
- kubectl get svcList services
The same reference, with no signal at all
Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.
Get it free on the App Store