JAEN

Kubernetes

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

The same reference, with no signal at all

Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).

Get it free on the App Store