• 20.调度器,预选策略和优选策略


    客户端 请求 apiserver  ------>  shceduler ------- node(kubelet或kube-proxy) 请求 apiserver 来进行pod和service创建,iptable和ipvs规则改写

    调度器    先进行预选再进行优选 ,最后进行select 

    调度器:
    预选策略:
    CheckNodeCondition:
    GeneralPredicates
    HostName:检查Pod对象是否定义了pod.spec.hostname,
    PodFitsHostPorts:pods.spec.containers.ports.hostPort
    MatchNodeSelector:pods.spec.nodeSelector
    PodFitsResources:检查Pod的资源需求是否能被节点所满足;
    NoDiskConflict:检查Pod依赖的存储卷是否能满足需求;
    PodToleratesNodeTaints:检查Pod上的spec.tolerations可容忍的污点是否完全包含节点上的污点;
    PodToleratesNodeNoExecuteTaints:
    CheckNodeLabelPresence:
    CheckServiceAffinity:

    MaxEBSVolumeCount
    MaxGCEPDVolumeCount
    MaxAzureDiskVolumeCount

    CheckVolumeBinding:
    NoVolumeZoneConflict:

    CheckNodeMemoryPressure
    CheckNodePIDPressure
    CheckNodeDiskPressure

    MatchInterPodAffinity

    优先函数:
    LeastRequested:
    (cpu((capacity-sum(requested))*10/capacity)+memory((capacity-sum(requested))*10/capacity))/2

    BalancedResourceAllocation:
    CPU和内存资源被占用率相近的胜出;

    NodePreferAvoidPods:
    节点注解信息“scheduler.alpha.kubernetes.io/preferAvoidPods”

    TaintToleration:将Pod对象的spec.tolerations列表项与节点的taints列表项进行匹配度检查,匹配条目越,
    得分越低;

    SeletorSpreading:

    InterPodAffinity:

    NodeAffinity:

    MostRequested:

    NodeLabel:

    ImageLocality:根据满足当前Pod对象需求的已有镜像的体积大小之和


    节点选择器:nodeSelector, nodeName
    节点亲和调度:nodeAffinity

  • 相关阅读:
    590. N 叉树的后序遍历
    CF605E
    网络流水题题单
    wqs二分的边界
    luoguP6326 Shopping
    【THUWC2020】工资分配
    CF1336简要题解
    「PKUWC2020」最小割
    洛谷P4895 独钓寒江雪
    省选联考2020简要题解
  • 原文地址:https://www.cnblogs.com/leleyao/p/10591397.html
Copyright © 2020-2023  润新知