This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.26.5. CPU 使用率の自動スケーリング
oc autoscale
コマンドを使用して、少なくとも指定される時間に実行する Pod の最大数を指定します。オプションとして Pod の最小数と Pod がターゲットとする平均の CPU 使用率を指定できます。 指定しない場合は、OpenShift Container Platform サーバーからのデフォルト値がそれらに指定されます。
以下に例を示します。
oc autoscale dc/frontend --min 1 --max 10 --cpu-percent=80
$ oc autoscale dc/frontend --min 1 --max 10 --cpu-percent=80
deploymentconfig "frontend" autoscaled
上記の例では、Horizontal Pod Autoscaler の autoscaling/v1
を使用して以下の定義で Horizontal Pod Autoscaler をする作成方法を示しています。
例26.1 Horizontal Pod Autoscaler オブジェクト定義
または、oc autoscale
コマンドは Horizontal Pod Autoscaler の v2beta1
バージョンを使用する際に以下の定義を使用して Horizontal Pod Autoscaler を作成します。