• Control CPU Management Policies on the Node | Kubernetes Control Memory Management Policies on a Node | Kubernetes Control Topology Management Policies on a node | Kubernetes 11
Non guaranteed Pod Non guaranteed Pod Non guaranteed Pod system.slice system.slice system.slice core 0 core 1 core 2 Guaranteed Pod Guaranteed Pod Guaranteed Pod Non guaranteed Pod Non guaranteed Pod Non guaranteed Pod system.slice system.slice system.slice core 3 core 4 core 5 kind: KubeletConfiguration cpuManagerPolicy: none Kubelet のコンフィグ K8s worker の CPU プロセス(system.slice, Pod)は、全てのコアにスケジューリングされる 13
はスケジュールされない Non guaranteed Pod kind: KubeletConfiguration Non guaranteed Pod system.slice system.slice system.slice core 0 core 1 core 2 cpuManagerPolicy: static reservedSystemCPUs: '0' Kubelet のコンフィグ Guaranteed Pod ・Guaranteed Pod が占有している core に他の Pod はスケジュールされない ・system.slice のプロセスはスケジュールされる Non guaranteed Pod Non guaranteed Pod system.slice system.slice system.slice core 3 core 4 core 5 K8s worker の CPU ※ strict-cpu-reservation を true にすると non guaranteed pod も core 0 にスケジュールしないようにできます 14
・ログ転送 (Alloy, Fluentd...) Guaranteed Pod Guaranteed Pod Guaranteed Pod Non guaranteed Pod Non guaranteed Pod Guaranteed Pod system.slice core 0 core 1 core 2 core 0 core 1 core 2 Guaranteed Pod Guaranteed Pod Guaranteed Pod Guaranteed Pod core 5 core 3 core 4 core 5 system.slice を core 0 に固定Guaranteed Guaranteed Pod Pod core 3 core 4 Memory Memory 18
◦ ◦ ◦ ◦ • ボツ理由:ingress, egress で BPF プログラムが必要で複雑になりそうだった。 自分でコネクショントラッキングしないと行けず、しんどそうだった。 受信時:DSCP=10 なら、BPF マップにエントリを追加(client-ip & client-port) 送信時:宛先 IP とポートをチェックして、BPF マップにエントリがあれば、 宛先 IP を Global IP に書き換え ボツ理由:暫定案と比較して既存の構成から離れるため 受信時:処理なし 送信時:送信元 IP をチェックして、type LoadBalancer で払い出した IP なら、 宛先 IP を Global IP に書き換え Cilium をバイパスさせる(Pod に Global IP を付けない) ◦ ◦ ◦ ボツ理由:Pod の lo if に Global IP を付けられない場合の案だった 受信時:DSCP=10 なら、宛先を Pod IP に書き換えて、Pod の IF にリダイレクト 送信時:送信元ポートが 80 or 443 なら、送信元を Global IP にする(一例) 27