8.8.2. ワーカーレイテンシープロファイルの使用と変更
node.config オブジェクトを編集することで、ネットワークレイテンシーに対応するために、ワーカーのレイテンシープロファイルをいつでも変更できます。この設定により、制御プレーンとコンピュートノード間のネットワークレイテンシーが変動した場合でも、クラスターが適切に動作させることができます。
ワーカーレイテンシープロファイルは、一度に 1 つずつ移行する必要があります。たとえば、Default プロファイルから LowUpdateSlowReaction ワーカーレイテンシープロファイルに直接移行することはできません。Default ワーカーレイテンシープロファイルから、MediumUpdateAverageReaction プロファイル、そして LowUpdateSlowReaction プロファイルへと移行する必要があります。同様に、Default プロファイルに戻る場合は、まずロープロファイルからミディアムプロファイルに移行し、次に Default に移行する必要があります。
OpenShift Container Platform クラスターのインストール時にワーカーレイテンシープロファイルを設定することもできます。
手順
中程度のワーカーレイテンシープロファイルに移動します。
node.configオブジェクトを編集します。$ oc edit nodes.config/clusterspec.workerLatencyProfile: MediumUpdateAverageReactionを追加します。node.configオブジェクトの例apiVersion: config.openshift.io/v1 kind: Node metadata: annotations: include.release.openshift.io/ibm-cloud-managed: "true" include.release.openshift.io/self-managed-high-availability: "true" include.release.openshift.io/single-node-developer: "true" release.openshift.io/create-only: "true" creationTimestamp: "2022-07-08T16:02:51Z" generation: 1 name: cluster ownerReferences: - apiVersion: config.openshift.io/v1 kind: ClusterVersion name: version uid: 36282574-bf9f-409e-a6cd-3032939293eb resourceVersion: "1865" uid: 0c0f7a4c-4307-4187-b591-6155695ac85b spec: workerLatencyProfile: MediumUpdateAverageReaction # ...各項目の説明:
spec.workerLatencyProfile.MediumUpdateAverageReaction- 中程度のワーカーレイテンシーポリシーを使用することを指定します。
変更が適用されている間は、各コンピュートノードでのスケジューリングは無効になります。
必要に応じて、ワーカーのレイテンシーが低いプロファイルに移動します。
node.configオブジェクトを編集します。$ oc edit nodes.config/clusterspec.workerLatencyProfileの値をLowUpdateSlowReactionに変更します。node.configオブジェクトの例apiVersion: config.openshift.io/v1 kind: Node metadata: annotations: include.release.openshift.io/ibm-cloud-managed: "true" include.release.openshift.io/self-managed-high-availability: "true" include.release.openshift.io/single-node-developer: "true" release.openshift.io/create-only: "true" creationTimestamp: "2022-07-08T16:02:51Z" generation: 1 name: cluster ownerReferences: - apiVersion: config.openshift.io/v1 kind: ClusterVersion name: version uid: 36282574-bf9f-409e-a6cd-3032939293eb resourceVersion: "1865" uid: 0c0f7a4c-4307-4187-b591-6155695ac85b spec: workerLatencyProfile: LowUpdateSlowReaction # ...各項目の説明:
spec.workerLatencyProfile.LowUpdateSlowReaction- ワーカーのレイテンシーを低く抑えるポリシーを使用することを指定します。
変更が適用されている間は、各コンピュートノードでのスケジューリングは無効になります。
検証
全ノードが
Ready状態に戻ると、以下のコマンドを使用して Kubernetes Controller Manager を確認し、これが適用されていることを確認できます。$ oc get KubeControllerManager -o yaml | grep -i workerlatency -A 5 -B 5出力例
# ... - lastTransitionTime: "2022-07-11T19:47:10Z" reason: ProfileUpdated status: "False" type: WorkerLatencyProfileProgressing - lastTransitionTime: "2022-07-11T19:47:10Z" message: all static pod revision(s) have updated latency profile reason: ProfileUpdated status: "True" type: WorkerLatencyProfileComplete - lastTransitionTime: "2022-07-11T19:20:11Z" reason: AsExpected status: "False" type: WorkerLatencyProfileDegraded - lastTransitionTime: "2022-07-11T19:20:36Z" status: "False" # ...各項目の説明:
status.message: all static pod revision(s) have updated latency profile- プロファイルが適用され、アクティブであることを指定します。
ミディアムプロファイルからデフォルト、またはデフォルトからミディアムに変更する場合、
node.configオブジェクトを編集し、spec.workerLatencyProfileパラメーターを適切な値に設定します。