When you work on a real-time environment there will be times when you want to run a specific type of workloads (or application) a designated worker node.
For example, production workloads should be running on specific worker nodes and shouldn’t get mixed with staging or development workloads.
This is where adding labels to the node will be helpful.
Let me show you how to add labels to nodes in Kubernetes, change the labels and remove those labels later.
You can list Kubernetes node details along with their labels in this fashion:
kubectl get nodes --show-labels
If you want to know the details for a specific node, use this:
kubectl label --list nodes node_name
The labels are in form of key-value pair. They must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to 63 characters each.
#kubernetes #docker