今天来看一下 Kubernetes 的调度策略 备注 每个版本的默认调度策略可能不太一样,具体可以查看相应版本的代码。 一、调度策略分类 pkg/scheduler/framework/plugins/legacy_registry.go 1 // Used as the default set of predicates if Policy was specified, but predicates was nil. 2 DefaultPredicates: sets.NewString( 3 NoVolumeZoneConflictPred, 4 MaxEBSVolumeCountPred, 5 MaxGCEPDVolumeCountPred, 6 MaxAzureDiskVolumeCountPred, 7 MaxCSIVolumeCountPred, 8 MatchInterPodAffinityPred, 9 NoDiskConflictPred, 10 GeneralPred, 11 PodToleratesNodeTaintsPred, 12 CheckVolumeBindingPred, 13 CheckNodeUnschedulablePred, 14 EvenPodsSpreadPred, 15 ), 16 17 // Used as the default set of predicates if Policy was specified, but priorities was nil. 18 DefaultPriorities: map[string]int64{ 19 SelectorSpreadPriority: 1, 20 InterPodAffinityPriority: 1, 21 LeastRequestedPriority: 1, 22 BalancedResourceAllocation: 1, 23 NodePreferAvoidPodsPriority: 10000, 24 NodeAffinityPriority: 1,……

阅读全文