Difference between revisions of "Kubernetes taints and tolerations"

From wikieduonline
Jump to navigation Jump to search
 
(18 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
Taints allow a [[node]] to repel a set of pods, in opposite to [[Node Affinity]]
 
Taints allow a [[node]] to repel a set of pods, in opposite to [[Node Affinity]]
 
 
* https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
 
* https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
 +
A taint consists of a key, value, and effect. As an argument here, it is expressed as <code>[[key=value:effect]]</code>. The effect must be <code>[[NoSchedule]], [[PreferNoSchedule]] or [[NoExecute]].</code>
  
 
* <code>[[kubectl taint]]</code>
 
* <code>[[kubectl taint]]</code>
  
  
* A taint consists of a key, value, and effect. As an argument here, it is expressed as <code>[[key=value:effect]]</code>
+
== Examples ==
* The effect must be [[NoSchedule]], [[PreferNoSchedule]] or [[NoExecute]].
 
 
 
 
 
== Example ==
 
 
  taints:
 
  taints:
 
     - key: [[eks.amazonaws.com/compute-type]]
 
     - key: [[eks.amazonaws.com/compute-type]]
 
       value: [[fargate]]
 
       value: [[fargate]]
       effect: NoSchedule
+
       [[effect]]: [[NoSchedule]]
  
  
Line 24: Line 20:
 
       value: [[gpuGroup]]
 
       value: [[gpuGroup]]
 
       effect: NoSchedule
 
       effect: NoSchedule
 +
 +
https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/examples/complete/main.tf
 +
      taints = {
 +
        dedicated = {
 +
          key    = "dedicated"
 +
          value  = "gpuGroup"
 +
          effect = "[[NO_SCHEDULE]]"
 +
        }
 +
      }
  
 
== Activities ==
 
== Activities ==
 
* Read https://www.mankier.com/1/kubectl-taint
 
* Read https://www.mankier.com/1/kubectl-taint
 +
* Read [[Node taints on managed node groups]]
  
 
== Related ==
 
== Related ==
 
* <code>[[tolerations:]]</code>
 
* <code>[[tolerations:]]</code>
 
* [[Node affinity]]
 
* [[Node affinity]]
* <code>[[aws eks node group]]</code>
+
* <code>[[aws_eks_node_group]]</code>
* [[eks_managed_node_groups]]
+
* <code>[[eks_managed_node_groups]]</code>
 +
* <code>[[eks.amazonaws.com/compute-type=fargate:NoSchedule]]</code>
 +
* [[NodeRestriction admission plugin]]
 +
* [[module.eks_managed_node_group]]
 +
* [[Kubernetes labels]]
 +
* [[Kubernetes Node Affinity]]
 +
* [[kind: NodePool]]
  
 
== See also ==
 
== See also ==
 +
* {{kubectl taint}}
 
* {{taints}}
 
* {{taints}}
* {{kubectl taint}}
 
  
 
[[Category:K8s]]
 
[[Category:K8s]]

Latest revision as of 07:41, 2 October 2024

Advertising: