REFACTOR(traefik): change traefik anti-affinity
- from hard to soft - Use preferredDuringSchedulingIgnoredDuringExecution instead of required - Allows pods to be scheduled on same node if necessary - Still prefers distribution across nodes (weight: 100)
This commit is contained in:
@@ -9,11 +9,13 @@ spec:
|
|||||||
deployment:
|
deployment:
|
||||||
replicas: 3
|
replicas: 3
|
||||||
|
|
||||||
# Pod Anti-Affinity - 각 노드에 최대 1개씩만 배치
|
# Pod Anti-Affinity - 가능하면 각 노드에 분산 배치 (soft)
|
||||||
affinity:
|
affinity:
|
||||||
podAntiAffinity:
|
podAntiAffinity:
|
||||||
requiredDuringSchedulingIgnoredDuringExecution:
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
- labelSelector:
|
- weight: 100
|
||||||
|
podAffinityTerm:
|
||||||
|
labelSelector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app.kubernetes.io/name: traefik
|
app.kubernetes.io/name: traefik
|
||||||
topologyKey: kubernetes.io/hostname
|
topologyKey: kubernetes.io/hostname
|
||||||
|
|||||||
Reference in New Issue
Block a user