Set or replace a label.
Section: Declarative Apply, Edit, and Replace
Add label
bash
bash
kubectl label deployment web tier=frontend --overwriteExplanation
Set or replace a label.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Declarative Apply, Edit, and Replace