Spread traefik pods across nodes #47
tduncan907
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Total new guy to Kubernetes and HA in general but I ran into a problem when, if I lost a node for updates, it was possible to lose my traefik instance if the scheduler put all three pods on that one node. I inserted these lines at the bottom of the traefik values.yaml file and updated the traefik deployment and now it spreads my three replicas across three different nodes in the cluster. I haven't figured out how to get the pod scheduled on the node I take down to spin back up on a different running node so if you guys have any ideas, that would be awesome!
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app.kubernetes.io/name: '{traefik}'
app.kubernetes.io/instance: '{traefik-traefik}'
topologyKey: kubernetes.io/hostname
Beta Was this translation helpful? Give feedback.
All reactions