3 ms·
Does kubernetes not have a mechanism for defining host/rack diversity constraints?
by rco8786 11y ago
Does kubernetes not have a mechanism for defining host/rack diversity constraints?
- kalmar 11y agoI'm not sure of the current status, but I believe the mechanism would be to label nodes with rack information. You'd then be able to specify anti-affinity constraints based on those labels that would be taken into account by the scheduler. Edit: browsing issues briefly, I don't think this functionality is available just yet. Discussion of node selectors: https://github.com/kubernetes/kubernetes/issues/341#issuecomment-154663349 https://github.com/kubernetes/kubernetes/issues/341#issuecom... -
- cpitman 11y agoI know that OpenShift 3, built on kubernetes, supports both affinity and anti-affinity policies (https://access.redhat.com/documentation/en/openshift-enterprise/version-3.0/openshift-enterprise-30-administrator-guide/chapter-9-scheduler https://access.redhat.com/documentation/en/openshift-enterpr...). I don't know if these are part of kubernetes or part of the extensions custom to OpenShift.
- davidopp_ 11y agoAll of those scheduling policies are also available in native Kubernetes. The Kubernetes version of that documentation is here: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/scheduler_algorithm.md https://github.com/kubernetes/kubernetes/blob/master/docs/de...
- ownagefool 11y agoThe scheduler is just best effort at the moment there's some ways around it. You could indeed create seperate replication-controllers against labels, such as your aws-zone, and run them seperatly. This flies in the face of having replication-controllers and sucks in my opinion. The other option is a single replication-controller and have your containers use a resouce that can't be reused, thus ensuring you're scheduled elsewhere. This is hacky. I suspect it'll be another year before kubernetes is all singing and dancing, but I do like using it.