Taint
Taint
污点的类型
打污点
kubectl taint node worker01 bubba=value:NoSchedule
删除污点
kubectl taint node worker01 bubba-
Demo
准备 yaml 文件
cat > taint-deployment.yaml << EOF
apiVersion: apps/v1
kind: Deployment
metadata:
name: taint-deployment
spec:
replicas: 8
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- image: nginx
name: nginx
ports:
- containerPort: 80
EOF
给节点 worker01 打上 taint
使用上方的 yaml 文件创建 Deployment
查看 pod 调度的节点信息
Last updated