Better HN
topnewbestaskshowjobs
Log inSign up

davidooo

25 karma · joined Jul 20, 2015 (11y ago) · 5 submissions

Submissions

comment 11y ago · link · parent

When Kubernetes runs on Mesos, that's correct.

Kubernetes can also run directly on VMs or physical machines.

comment 11y ago · link · parent

There's also a hosted version of Kubernetes, called Google Container Engine: https://cloud.google.com/container-engine/

comment 11y ago · link · parent

The page you linked to describes a slightly different feature, namely the ability to restrict and override the resource requirements of Pods at the time they are submitted to the system. So it's part of the admission control system, not part of the scheduling.

The documentation on resource-based scheduling is at https://github.com/GoogleCloudPlatform/kubernetes/blob/maste...

comment 11y ago · link · parent

Currently resource requirements are specified only on containers, not Pods. The requirements for the Pod are computed by adding up the requirements of the containers within the Pod.

To be more concrete: Within the PodSpec type that you linked to, there is a field of type []Container. Within the Container type there is a field called Resources which is of type ResourceRequirements. ResourceRequirements lets you specify resource requirements of the container. The resource requirements of the Pod are computed by adding up the resource requirements of the containers that run within the Pod.

In addition to resource-based scheduling, we also support "label selectors" which allows you to label nodes with key/value pairs and then say that a Pod should only run on nodes with particular labels. That's specified in the NodeSelector field of the PodSpec (which you linked to).

comment 11y ago · link · parent

The Kubernetes scheduler also does resource-aware scheduling. You're correct that it tries to spread replicas across nodes, but it only spreads them across the nodes that have enough free resources for the container (more precisely, Pod) that it's scheduling.