您的位置 首页 k8s

k8s 污点之NoExecute参考案例

k8s 污点之NoExecute参考案例

1.创建资源清单

apiVersion: apps/v1
kind: Deployment
metadata:
  name: deploy-taint
spec:
  replicas: 10
  selector:
    matchExpressions:
    - key: apps
      values: 
      - "v1"
      - "v2"
      operator: NotIn
  template:
    metadata:
      labels:
        school: baimei
    spec:
      # 如果测试效果不明显,可以使用nodeName来测试
      #nodeName: worker232
      containers:
      - name: v1
        image: harbor.baimei.com/baimei-apps/apps:v1

2.打污点

kubectl taint node worker232 school=baimei:NoExecute

 

 

kubectl describe nodes | grep Taints -A 2

3.观察Pod的调度情况

 kubectl get pods -o wide

 

欢迎来撩 : 汇总all

白眉大叔

关于白眉大叔linux云计算: 白眉大叔

热门文章