k8wiz
Kubernetes
Medium
Commands

Which command would you use to label a node?

Select your answer:

Show answer and explanation

Answer: kubectl label node <node-name> key=value

Explanation

The 'kubectl label node <node-name> key=value' command adds or updates labels on a node. Labels are key-value pairs that can be used to organize and select subsets of objects, such as nodes with specific capabilities or in specific regions.

Read more about Kubernetes