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

AntiAffinity prevents containers from starting on single node #29

Open
Seth-Miller opened this issue Apr 9, 2018 · 2 comments
Open

Comments

@Seth-Miller
Copy link

I am using minikube with only a single node. Because the statefulset has an anti-affinity rule, only the first container will start. Simply changing this from anti-affinity to affinity fixes the problem and allows all three containers to start.

      affinity:
#        podAntiAffinity:
        podAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            - labelSelector:
                matchExpressions:
                  - key: app
                    operator: In
                    values:
                      - consul
              topologyKey: kubernetes.io/hostname
@kelseyhightower
Copy link
Owner

Yes, This configuration is designed for a production like configuration. I'll consider adding a note to the tutorial.

@hiranya1
Copy link

Don't we get much advantage if we can use Daemenset instead of Statefulset?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants