Difference between revisions of "Kubernetes taints and tolerations"
Jump to navigation
Jump to search
(39 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]] | ||
+ | * 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> | ||
+ | |||
+ | == Examples == | ||
+ | taints: | ||
+ | - key: [[eks.amazonaws.com/compute-type]] | ||
+ | value: [[fargate]] | ||
+ | [[effect]]: [[NoSchedule]] | ||
− | |||
− | |||
− | |||
− | * https:// | + | [[spec:]] |
+ | [[providerID]]: aws:///us-east-1a/i-085c2fcaaerterq | ||
+ | taints: | ||
+ | - key: dedicated | ||
+ | value: [[gpuGroup]] | ||
+ | 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 == | ||
+ | * Read https://www.mankier.com/1/kubectl-taint | ||
+ | * Read [[Node taints on managed node groups]] | ||
+ | |||
+ | == Related == | ||
+ | * <code>[[tolerations:]]</code> | ||
+ | * [[Node affinity]] | ||
+ | * <code>[[aws_eks_node_group]]</code> | ||
+ | * <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}} | * {{kubectl taint}} | ||
− | * {{ | + | * {{taints}} |
[[Category:K8s]] | [[Category:K8s]] |
Latest revision as of 07:41, 2 October 2024
Taints allow a node to repel a set of pods, in opposite to Node Affinity
A taint consists of a key, value, and effect. As an argument here, it is expressed as key=value:effect
. The effect must be NoSchedule, PreferNoSchedule or NoExecute.
Contents
Examples[edit]
taints: - key: eks.amazonaws.com/compute-type value: fargate effect: NoSchedule
spec: providerID: aws:///us-east-1a/i-085c2fcaaerterq taints: - key: dedicated value: gpuGroup 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[edit]
Related[edit]
tolerations:
- Node affinity
aws_eks_node_group
eks_managed_node_groups
eks.amazonaws.com/compute-type=fargate:NoSchedule
- NodeRestriction admission plugin
- module.eks_managed_node_group
- Kubernetes labels
- Kubernetes Node Affinity
- kind: NodePool
See also[edit]
Advertising: