Site icon kskilling

Certified Kubernetes Administrator Study Guide – Scheduling – Use label selectors to schedule pods

nodeSelector:
  accelerator: nvidia-tesla-p100

This example is telling Kubernetes to select only nodes with the label accelerator = nvidia-tesla-p100.

Where accelerator is the is the key and nvidia-tesla-p100 is the value.

kubectl label node vm-node1 environment=production
selector:{
  "component": "redis",
}

  or

selector:
  component: redis

Can use kubectl with labels using:

kubectl get pods -l environment=production, tier=frontend

Exit mobile version