zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    Visual Studio 2008中文正式版
    属性控制类
    PowerDesigner11技巧
    OPENXML用法
    .net下载文件
    Merge Into 语句代替Insert/Update在Oracle中的应用实战
    PowerDesigner中使用vbscript访问对象进行批量操作
    转:SubSonic介绍和相关文章
    C# 多线程控制控件实例(例程简单,注释详细)
    学习SubSonic的笔记 Version 2.1
  • 原文地址:https://www.cnblogs.com/leleyao/p/10591397.html
Copyright © 2011-2022 走看看