Overview
Add a Taint
kubectl taint nodes docker-desktop is_control=true:NoExecute
Remove a Taint
kubectl taint nodes docker-desktop is_control=true:NoExecute-
Example
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: fluentd-elasticsearch
namespace: kube-system
labels:
k8s-app: fluentd-logging
spec:
selector:
matchLabels:
name: fluentd-elasticsearch
template:
metadata:
labels:
name: fluentd-elasticsearch
spec:
tolerations:
- key: "is_control"
operator: "Equal"
value: "true"
effect: "NoExecute"
containers:
- name: fluentd-elasticsearch
..
The above toleration will allow the pod to be deployed on a node with a matching taint.
References
| Reference | URL |
|---|---|
| Taints and Tolerations | https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ |
| Kubernetes Taints & Tolerations | https://www.densify.com/kubernetes-autoscaling/kubernetes-taints |