- Add a taint to node and generate manifest for the pod
k taint node --help
k taint node -l work_type=redis app_type=alpha:NoSchedule
k run alpha --image redis --dry-run=client -o yaml > 9.yaml
- Add
tolerations
to pod
# vim 9.yaml
apiVersion: v1
kind: Pod
metadata:
labels:
run: alpha
name: alpha
spec:
containers:
- image: redis
name: alpha
tolerations:
- key: "app_type"
operator: "Equal"
value: "alpha"
effect: "NoSchedule"
k apply -f 9.yaml