Kubernetes Blog
Follow
Kubernetes v1.35: Extended Toleration Operators to Support Numeric Comparisons (Alpha)
Kubernetes v1.35 introduces Extended Toleration Operators, adding Gt (Greater Than) and Lt (Less Than) operators to tolerations for more flexible scheduling. This enhancement enables threshold-based placement, moving beyond exact matching of taints and tolerations. The new operators allow pods to specify numeric thresholds, like failure probability or cost per hour. This allows for SLA-based workload placement, enabling critical applications to avoid high-risk nodes. Nodes are tainted with numeric values, and pods use Lt or Gt operators in their tolerations to express preferences. This approach offers policy orientation, eviction, and ergonomic advantages over NodeAffinity for these use cases. Examples include scheduling fault-tolerant jobs on spot instances while restricting critical workloads. AI workloads can leverage GPU tiers based on compute scores. Cost optimization is also facilitated, allowing batch jobs to prefer cheaper nodes. Performance-based placement is achievable, such as scheduling pods on nodes with sufficient disk IOPS. To use this feature, enable the feature gate and taint nodes with numeric values. Pods then define tolerations using the new operators, matching against node taints. This alpha feature, driven by the SIG Scheduling community, is still evolving. Future plans include supporting Common Expression Language (CEL) and improving cluster autoscaling integration.