Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

score: recommend setting hostname podAntiAffinity #77

Closed
zegl opened this issue Jan 7, 2019 · 0 comments · Fixed by #78
Closed

score: recommend setting hostname podAntiAffinity #77

zegl opened this issue Jan 7, 2019 · 0 comments · Fixed by #78
Labels
enhancement New feature or request

Comments

@zegl
Copy link
Owner

zegl commented Jan 7, 2019

Recommend setting a podAntiAffinity on Deployments and StatefulSets:

Either a preferredDuringSchedulingIgnoredDuringExecution or a requiredDuringSchedulingIgnoredDuringExecution anti affinity with the kubernetes.io/hostname key should be set.

Setting this prevents all pods in a deployment from being scheduled on the same node if there are other nodes available.

spec:
  template:
    spec:
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
           - topologyKey: "kubernetes.io/hostname"
@zegl zegl added the enhancement New feature or request label Jan 7, 2019
@zegl zegl changed the title score: recommend score: recommend setting hostname podAntiAffinity Jan 7, 2019
zegl added a commit that referenced this issue Jan 7, 2019
…me node

This check checks if Deployments and StatefulSets has a podAntiAffinity set with kubernetes.io/hostname as the topology key

This should help prevent scheduling pods on the same node, which can be a bad practice in case that node disappears (for whaterver reason)

This fixes #77
@zegl zegl closed this as completed in #78 Jan 7, 2019
zegl added a commit that referenced this issue Jan 7, 2019
…me node

This check checks if Deployments and StatefulSets has a podAntiAffinity set with kubernetes.io/hostname as the topology key

This should help prevent scheduling pods on the same node, which can be a bad practice in case that node disappears (for whaterver reason)

This fixes #77
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant