Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 749 Bytes

File metadata and controls

39 lines (26 loc) · 749 Bytes

Node Selector

In this training course, we will learn about Node Selector.

Navigate to the folder 20_nodeselector from CLI, before you get started.

Show all Nodes with its Labels

kubectl get nodes --show-labels

Add a Label to a node

kubectl label node <NODE-NAME> preferred=true

Inspect pod.yaml definition file and create the pod

cat pod.yaml
kubectl create -f pod.yaml

Verify that the pod is running on the labeled node

 kubectl get pods -o wide

Cleanup

kubectl label node <NODE-NAME> preferred-
kubectl delete pods my-pod

Jump to Home | Previous Training | Next Training