Taints and affinity

тэкс, для sts работает taint + tolerations
ставится она так

сначала надо отметить ноду как noschedule для всех без пометки

taint nodes node_name service=database:NoSchedule

после нужно добавить в стс запись

containers:

tolerations:
- effect: NoSchedule
  key: service
  operator: Equal
  value: database

только поды стсов с этой пометкой смогут хоститься на ноде

для deployment настройка делается через podAffinity

[code]

сначала нужно пометить ноду

kubectl label node node_name service=database

после этого настраивается deployment

affinity:
  nodeAffinity:
    requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
        - matchExpressions:
          - key: service
            operator: In
            value: database

containers:

40 комментариев на Taints and affinity

  1. Excellent comparison of taints vs affinity in Kubernetes! The distinction is crucial — taints actively repel pods while affinity attracts them. Just like how a well-designed jiliqq app uses smart routing for optimal performance, choosing the right pod placement strategy prevents resource conflicts. Your NoSchedule examples perfectly illustrate production-grade cluster management.

Добавить комментарий для playtimeappapk Отменить ответ

Ваш адрес email не будет опубликован. Обязательные поля помечены *