RoadMap
关键特性
<button class="headerButton">特性</button>
|
<button class="headerButton">说明</button>
|
---|---|
CPUManager | Enable container level CPU affinity support |
CPUManagerPolicyAlphaOptions | This allows fine-tuning of CPUManager policies, experimental, Alpha-quality options This feature gate guards a group of CPUManager options whose quality level is alpha. This feature gate will never graduate to beta or stable. |
CPUManagerPolicyBetaOptions | This allows fine-tuning of CPUManager policies, experimental, Beta-quality options This feature gate guards a group of CPUManager options whose quality level is beta. This feature gate will never graduate to stable. |
CPUManagerPolicyOptions | Allow fine-tuning of CPUManager policies. |
CustomCPUCFSQuotaPeriod | Enable nodes to change cpuCFSQuotaPeriod in kubelet config |
特性门控
<button class="headerButton">特性</button>
|
<button class="headerButton">默认值</button>
|
<button class="headerButton">阶段</button>
|
<button class="headerButton">自从</button>
|
<button class="headerButton">直到</button>
|
---|---|---|---|---|
CustomCPUCFSQuotaPeriod |
false |
Alpha | 1.12 | – |
CPUManager |
false |
Alpha | 1.8 | 1.9 |
CPUManager |
true |
Beta | 1.10 | 1.25 |
CPUManager |
true |
GA | 1.26 | – |
CPUManagerPolicyAlphaOptions |
false |
Alpha | 1.23 | – |
CPUManagerPolicyBetaOptions |
true |
Beta | 1.23 | – |
CPUManagerPolicyOptions |
false |
Alpha | 1.22 | 1.22 |
CPUManagerPolicyOptions |
true |
Beta | 1.23 | – |
如何使用
<button class="headerButton">k8s version</button>
|
<button class="headerButton">配置</button>
|
---|---|
< 1.8 | 不支持 |
< 1.10 |
特性门控: --feature-gates= 配置参数: --cpu-manager-policy=none | static cpuManagerPolicy=none | static
|
>= 1.10 |
配置参数: --cpu-manager-policy=none | static cpuManagerPolicy=none | static |
cpuManagerPolicy
可以通过两种方式配置cpu management policy:
- kubelet命令行参数:--cpu-manager-policy=none | static
- KubeletConfiguration:cpuManagerPolicy=none | static
cpu management policy有两种可能的值:
- none:默认配置,通过CFS Quota来管理CPU
- static:针对具有整数型 CPU
requests
的Guaranteed
Pod, 它允许该类 Pod 中的容器访问节点上的独占 CPU 资源
none
static
static模式工作流程大致如下:
static模式下节点的资源要点如下:
- 关于预留:
- 设置cpumanager policy为static时,需要通过kubeReserved、systemReserved预留资源,否则可能出现共享池为空的情况
- 资源池分类:
- 最初时,除预留CPU外,所有CPU均归属到shared pool中,当pod满足整数CPU请求的Guaranteed时,从共享池移除相应资源归属到exclusive CPUs中
- 共享池用于运行BestEffort、Burstable、小数CPU请求的Guaranteed pod
- exclusive CPUs资源池运行整数CPU请求的Guaranteed pod