taints and tolerations


title: “taints and tolerations”
date: 2020-04-01T17:19:35
slug: taints-and-tolerations


Add Taint to a Node:
kubectl taint nodes node1 key=value:NoSchedule

Add toleration to a pod:
apiVersion: v1
kind: Pod
metadata:
name: nginx
labels:
env: test
spec:
containers:
– name: nginx
image: nginx
imagePullPolicy: IfNotPresent
tolerations:
– key: “example-key”
operator: “Exists”
effect: “NoSchedule”

Print Friendly, PDF & Email