Taints和Tolerations 污点和容忍
参考:
K8S taint(污点)和tolerations(污点容忍)_运维@小兵的博客-CSDN博客
k8s-污点 (Taint)和容忍 (Tolerations)_k8s 污点_是个笨小孩的博客-CSDN博客
设置污点结点
kubectl taint nodes scms02 type111=dev:NoSchedule
设置容忍策略:
apiVersion: v1
kind: Pod
metadata:
name: test-taint
spec:
tolerations:
#kubectl taint nodes node1 type111=dev:NoSchedule
- key: "type111"
operator: "Exists"
effect: "NoSchedule"
#如果该pod正在运行,所有结点都被加入一个匹配的taint,则这个pod会持续在这个结点上存活3600后被驱逐
tolerationSeconds: 3600
containers:
- name: test-taint
image: nginx
~
~