6.10. クラスター内のノードに特定の CPU を割り当てる
static CPU マネージャーポリシー を使用すると、クラスター内の特定のノードで使用するために特定の CPU を予約できます。たとえば、24 CPU のあるシステムでは、コントロールプレーン用に 0 - 3 の番号が付けられた CPU を予約して、コンピュートノードが CPU 4 - 23 を使用できるようにすることができます。
6.10.1. ノードの CPU の予約 リンクのコピーリンクがクリップボードにコピーされました!
特定のノード用に予約される CPU のリストを明示的に定義するには、KubeletConfig カスタムリソース (CR) を作成して reservedSystemCPUs パラメーターを定義します。このリストは、systemReserved パラメーターを使用して予約されている CPU よりも優先されます。
手順
設定する必要のあるノードタイプの Machine Config Pool (MCP) に関連付けられたラベルを取得します。
$ oc describe machineconfigpool <name>以下に例を示します。
$ oc describe machineconfigpool worker出力例
Name: worker Namespace: Labels: machineconfiguration.openshift.io/mco-built-in= pools.operator.machineconfiguration.openshift.io/worker=1 Annotations: <none> API Version: machineconfiguration.openshift.io/v1 Kind: MachineConfigPool #...- 1
- MCP ラベルを取得します。
KubeletConfigCR の YAML ファイルを作成します。apiVersion: machineconfiguration.openshift.io/v1 kind: KubeletConfig metadata: name: set-reserved-cpus1 spec: kubeletConfig: reservedSystemCPUs: "0,1,2,3"2 machineConfigPoolSelector: matchLabels: pools.operator.machineconfiguration.openshift.io/worker: ""3 #...CR オブジェクトを作成します。
$ oc create -f <file_name>.yaml