5.3. Red Hat OpenShift Service on AWS クラスターのマシンプールでプロセス ID 制限を高く設定する
--pod-pids-limit パラメーターを変更する KubeletConfig オブジェクトを作成または編集することで、既存の Red Hat OpenShift Service on AWS クラスター内のマシンプールに対して、より高い podPidsLimit を設定できます。
既存のマシンプールの podPidsLimit を変更すると、マシンプール内のノードが 1 つずつ再起動されます。この変更はマシンプールのワークロードのピーク使用時間外に行い、すべてのノードが再起動されるまでクラスターのアップグレードや休止状態を避けてください。
前提条件
- Red Hat OpenShift Service on AWS クラスターがある。
-
ROSA コマンドラインインターフェイス (CLI) (
rosa) をインストールした。 - ROSA CLI を使用して Red Hat アカウントにログインしている。
手順
新しい
--pod-pids-limitを指定するクラスターの新しいKubeletConfigオブジェクトを作成します。$ rosa create kubeletconfig -c <cluster_name> --name=<kubeletconfig_name> --pod-pids-limit=<value>たとえば次のコマンドは、Pod あたり最大 16,384 個の PID を設定する、
my-clusterクラスターのset-high-pidsKubeletConfigオブジェクトを作成します。$ rosa create kubeletconfig -c my-cluster --name=set-high-pids --pod-pids-limit=16384新しい
KubeletConfigオブジェクトを、新規または既存のマシンプールに関連付けます。新規マシンプールの場合:
$ rosa create machinepool -c <cluster_name> --name <machinepool_name> --kubelet-configs=<kubeletconfig_name>既存マシンプールの場合:
$ rosa edit machinepool -c <cluster_name> --kubelet-configs=<kubeletconfig_name> <machinepool_name>出力例
Editing the kubelet config will cause the Nodes for your Machine Pool to be recreated. This may cause outages to your applications. Do you wish to continue? (y/N)
たとえば次のコマンドは、
set-high-pidsKubeletConfigオブジェクトをmy-clusterクラスターのhigh-pid-poolマシンプールに関連付けます。$ rosa edit machinepool -c my-cluster --kubelet-configs=set-high-pids high-pid-pool新しい
KubeletConfigオブジェクトが既存のマシンプールにアタッチされると、ワーカーノードのローリングリブートがトリガーされます。ロールアウトの進行状況は、マシンプールの説明で確認できます。$ rosa describe machinepool --cluster <cluster_name> --machinepool <machinepool_name>
検証
マシンプール内のノードに、新しい設定が適用されていることを確認します。
$ rosa describe kubeletconfig --cluster=<cluster_name> --name <kubeletconfig_name>次の例に示すように、新しい PID 制限が出力に表示されます。
出力例
Pod Pids Limit: 16384