If I have 3 minions in my kubernetes cluster, is there a way I can tell replication controller to create 20% of pods on minion1, 50% on minion2 and 30% on minion 3?
Unfortunately right now the answer is no. The easiest thing to do is to create three replication controllers, each with the desired number of replicas, and each with a podTemplate that uses nodeSelector to pick one node. This has the downside that you are specifying an exact node name, so if that node fails, the pods will go pending.
As @bitchecker said, in theory you could use one ReplicationController and use the --max-pods option on each node. This is tricky, though, because system pods like Heapster will be included in the count, and in any event it doesn't work if you want to share the node with pods from other ReplicationControllers. (And it has the same problem from above, where it doesn't really work when the node fails and you want those pods to be rescheduled onto another node).
I don't think writing your own scheduler would be the right approach, but you could write your own controller or modify ReplicationController, if you are ambitious. :-)
Good luck!
Yes. But you have to write custom Scheduler with your logic.
i think that the only way to do this is to configure every node with the --max-pods
option.