Re:I Want to Run Stateful Containers, Too
by rco8786 on Sunday November 22, 2015 @10:04AM
(#10610229)
Does kubernetes not have a mechanism for defining host/rack diversity constraints?
[ Parent
| on HN ]
Re:I Want to Run Stateful Containers, Too
by ownagefool on Sunday November 22, 2015 @11:23AM
(#10610492)
The 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.
Re:I Want to Run Stateful Containers, Too
by cpitman on Sunday November 22, 2015 @11:11AM
(#10610449)
I know that OpenShift 3, built on kubernetes, supports both affinity and anti-affinity policies (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.
Re:I Want to Run Stateful Containers, Too
by davidopp_ on Sunday November 22, 2015 @03:06PM
(#10611260)
All 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/de...
Re:I Want to Run Stateful Containers, Too
by kalmar on Sunday November 22, 2015 @11:10AM
(#10610444)
I'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#issuecom... -