by deafult,Scheduler will schedule Pods to all available Nodes.
But in some situations,we will deploy Pod to assigned Node such as deploying using I/O’s Pod to Node with SSD,using GPU’s Pod to Node with GPU.
Using label,k8s solves this.
label is the pair of key-value .

kubectl label node k8s-0002 disktype=ssd
kubectl get node --show-labels
k8s-deploy Pod to assigned Node
we can use the type to deploy Pod to assigned Node

spec 's nodeSelector to set the ssd Node

k8s-deploy Pod to assigned Node

k8s-deploy Pod to assigned Node
the Pod is running on k8s-0002 Node

delete the label
k8s-deploy Pod to assigned Node

相关文章:

  • 2022-12-23
  • 2021-06-06
  • 2021-09-07
  • 2021-08-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-22
  • 2022-01-05
  • 2021-07-18
  • 2021-11-10
  • 2021-08-22
  • 2021-11-25
  • 2021-09-04
相关资源
相似解决方案