次の方法で共有


az aks maintenanceconfiguration

Note

このリファレンスは、Azure CLI (バージョン 2.56.0 以降) の aks-preview 拡張機能の一部です。 拡張機能は、az aks メインtenanceconfiguration コマンドを初めて実行するときに自動的にインストールされます。 拡張機能の詳細をご覧ください。

マネージド Kubernetes クラスターでメインテナント構成を管理するコマンド。

コマンド

名前 説明 Status
az aks maintenanceconfiguration add

マネージド Kubernetes クラスターにメインテナント構成を追加します。

拡張機能 GA
az aks maintenanceconfiguration delete

マネージド Kubernetes クラスターのメインテナント構成を削除します。

拡張機能 GA
az aks maintenanceconfiguration list

マネージド Kubernetes クラスターメインテナント構成を一覧表示します。

拡張機能 GA
az aks maintenanceconfiguration show

マネージド Kubernetes クラスターのメインテナント構成の詳細を表示します。

拡張機能 GA
az aks maintenanceconfiguration update

マネージド Kubernetes クラスターのメインテナント構成を更新します。

拡張機能 GA

az aks maintenanceconfiguration add

マネージド Kubernetes クラスターにメインテナント構成を追加します。

az aks maintenanceconfiguration add --cluster-name
                                    --name
                                    --resource-group
                                    [--config-file]
                                    [--day-of-month]
                                    [--day-of-week]
                                    [--duration]
                                    [--interval-days]
                                    [--interval-months]
                                    [--interval-weeks]
                                    [--schedule-type {AbsoluteMonthly, Daily, RelativeMonthly, Weekly}]
                                    [--start-date]
                                    [--start-hour]
                                    [--start-time]
                                    [--utc-offset]
                                    [--week-index {First, Fourth, Last, Second, Third}]
                                    [--weekday]

--weekday と --start-hour を使用して、既定のメインテナント構成を追加します。

az aks maintenanceconfiguration add -g MyResourceGroup --cluster-name test1 -n default --weekday Monday  --start-hour 1
  The maintenance is allowed on Monday 1:00am to 2:00am

--weekday を使用して既定のメインテナント構成を追加します。 メインテナントは、その日の任意の時刻に許可されます。

az aks maintenanceconfiguration add -g MyResourceGroup --cluster-name test1 -n default --weekday Monday
  The maintenance is allowed on Monday.

メインテナント構成 json ファイルを使用して既定のメインテナント構成を追加する

az aks maintenanceconfiguration add -g MyResourceGroup --cluster-name test1 -n default --config-file ./test.json
    The content of json file looks below. It means the maintenance is allowed on UTC time Tuesday 1:00am - 3:00 am and Wednesday 1:00am - 2:00am, 6:00am-7:00am
    No maintenance is allowed from 2020-11-26T03:00:00Z to 2020-11-30T12:00:00Z and from 2020-12-26T03:00:00Z to 2020-12-26T12:00:00Z even if they are allowed in the above weekly setting
    {
          "timeInWeek": [
            {
              "day": "Tuesday",
              "hourSlots": [
                1,
                2
              ]
            },
            {
              "day": "Wednesday",
              "hourSlots": [
                1,
                6
              ]
            }
          ],
          "notAllowedTime": [
            {
              "start": "2021-11-26T03:00:00Z",
              "end": "2021-11-30T12:00:00Z"
            },
            {
              "start": "2021-12-26T03:00:00Z",
              "end": "2021-12-26T12:00:00Z"
            }
          ]
  }

毎日のスケジュールで aksManagedNodeOSUpgradeSchedule メインtenance 構成を追加します。

az aks maintenanceconfiguration add -g MyResourceGroup --cluster-name test1 -n aksManagedNodeOSUpgradeSchedule --schedule-type Daily --interval-days 2 --duration 12 --utc-offset=-08:00 --start-date 2023-01-16 --start-time 00:00
  The maintenance is allowed from 00:00 to 12:00 (adjusted with UTC offset: -08:00) every two days, and this configuration will be effective from 2023-01-16.

毎週のスケジュールで aksManagedNodeOSUpgradeSchedule メインテナント構成を追加します。

az aks maintenanceconfiguration add -g MyResourceGroup --cluster-name test1 -n aksManagedNodeOSUpgradeSchedule --schedule-type Weekly --day-of-week Friday --interval-weeks 3 --duration 8 --utc-offset +05:30 --start-date 2023-01-16 --start-time 09:30
  The maintenance is allowed on Friday from 09:30 to 17:30 (adjusted with UTC offset: +05:30) every three weeks, and this configuration will be effective from 2023-01-16.

絶対月次スケジュールで aksManagedAutoUpgradeSchedule メインテナント構成を追加します。

az aks maintenanceconfiguration add -g MyResourceGroup --cluster-name test1 -n aksManagedAutoUpgradeSchedule --schedule-type AbsoluteMonthly --day-of-month 15 --interval-months 1 --duration 6 --utc-offset +05:30 --start-date 2023-01-16 --start-time 09:30
  The maintenance is allowed on the 15th of the month from 09:30 to 15:30 (adjusted with UTC offset: +05:30) every month, and this configuration will be effective from 2023-01-16.

相対月次スケジュールを使用して aksManagedAutoUpgradeSchedule メインテナント構成を追加します。

az aks maintenanceconfiguration add -g MyResourceGroup --cluster-name test1 -n aksManagedAutoUpgradeSchedule --schedule-type RelativeMonthly --day-of-week Tuesday --week-index Last --interval-months 3 --duration 6 --start-date 2023-01-16 --start-time 09:30
  The maintenance is allowed on the last Tuesday from 09:30 to 15:30 in default UTC time every 3 months, and this configuration will be effective from 2023-01-16.

json ファイルを使用して aksManagedAutoUpgradeSchedule メインtenance 構成を追加します。

az aks maintenanceconfiguration add -g MyResourceGroup --cluster-name test1 -n aksManagedAutoUpgradeSchedule --config-file ./test.json
    The content of json file looks below. It means the maintenance is allowed on the 1st of the month from 09:00 to 13:00 (adjusted with UTC offset: -08:00) every 3 months, and this configuration will be effective from 2023-01-16.
    No maintenance is allowed from 2022-12-23 to 2023-01-05 and from 2023-11-23 to 2023-11-26 even if they are allowed in the above monthly setting
    {
        "maintenanceWindow": {
            "schedule": {
                "absoluteMonthly": {
                    "intervalMonths": 3,
                    "dayOfMonth": 1
                }
            },
            "durationHours": 4,
            "utcOffset": "-08:00",
            "startTime": "09:00",
            "notAllowedDates": [
                {
                    "start": "2022-12-23",
                    "end": "2023-01-05"
                },
                {
                    "start": "2023-11-23",
                    "end": "2023-11-26"
                }
            ]
        }
    }

必須のパラメーター

--cluster-name

クラスター名。

--name -n

構成名。

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name> を使用して、既定のグループを構成できます。

省略可能のパラメーター

--config-file

メインテナント構成 json ファイル。

--day-of-month

メインテナントが発生する月の日付を指定します。 たとえば、1 は月の 1 番目を示します。 絶対月次スケジュールの種類にのみ適用されます。

--day-of-week

メインの曜日を指定します。 例: "Monday"。 週単位および相対月単位のスケジュールの種類に適用されます。

--duration

メインテナント ウィンドウの長さは、4 時間から 24 時間の範囲です。

--interval-days

日単位のスケジュールの種類の各出現のセット間の日数。

--interval-months

各出現回数の間の月数。 絶対および相対月次スケジュールの種類に適用されます。

--interval-weeks

各出現のセット間の週数。 週単位のスケジュールの種類にのみ適用されます。

--schedule-type

メインテナント スケジュールには、'Daily'、'Weekly'、'AbsoluteMonthly' または 'RelativeMonthly' のいずれかを選択します。 'aksManagedAutoUpgradeSchedule' および 'aksManagedNodeOSUpgradeSchedule' メインテナント構成にのみ適用されます。

承認された値: AbsoluteMonthly, Daily, RelativeMonthly, Weekly
--start-date

メインテナント構成がアクティブ化される日付。 指定しない場合、メインテナント ウィンドウはすぐにアクティブになります。"。

--start-hour

メインテナントが許可されている 1 時間の開始時刻。 たとえば、1 は 1:00 am から 2:00 am の間に許可されます。 既定のメインテナント構成にのみ適用されます。

--start-time

メインテナント ウィンドウの開始時刻。 指定できる値は、'00:00' から '23:59' までです。 '--utc-offset' はこのフィールドに適用されます。 たとえば、'--utc-offset +02:00' の '02:00' は UTC 時刻 '00:00' を意味します。

--utc-offset

形式 +/-HH:mm の UTC オフセット。 たとえば、IST の場合は '+05:30'、PST の場合は '-07:00' などです。 指定しない場合、既定値は '+00:00' です。

--week-index

"--day-of-week" で指定した許容日数のインスタンスを指定して、メインを実行します。 相対月次スケジュールの種類にのみ適用されます。

承認された値: First, Fourth, Last, Second, Third
--weekday

メインテナントが許可される曜日。 例: 月曜日 既定のメインテナント構成にのみ適用されます。

グローバル パラメーター
--debug

すべてのデバッグ ログを表示するようにログの詳細レベルを上げます。

--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告は抑制します。

--output -o

出力形式。

承認された値: json, jsonc, none, table, tsv, yaml, yamlc
既定値: json
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ をご覧ください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

--verbose

ログの詳細レベルを上げます。 詳細なデバッグ ログを表示するには --debug を使います。

az aks maintenanceconfiguration delete

マネージド Kubernetes クラスターのメインテナント構成を削除します。

az aks maintenanceconfiguration delete --cluster-name
                                       --name
                                       --resource-group

必須のパラメーター

--cluster-name

クラスター名。

--name -n

構成名。

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name> を使用して、既定のグループを構成できます。

グローバル パラメーター
--debug

すべてのデバッグ ログを表示するようにログの詳細レベルを上げます。

--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告は抑制します。

--output -o

出力形式。

承認された値: json, jsonc, none, table, tsv, yaml, yamlc
既定値: json
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ をご覧ください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

--verbose

ログの詳細レベルを上げます。 詳細なデバッグ ログを表示するには --debug を使います。

az aks maintenanceconfiguration list

マネージド Kubernetes クラスターメインテナント構成を一覧表示します。

az aks maintenanceconfiguration list --cluster-name
                                     --resource-group

必須のパラメーター

--cluster-name

クラスター名。

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name> を使用して、既定のグループを構成できます。

グローバル パラメーター
--debug

すべてのデバッグ ログを表示するようにログの詳細レベルを上げます。

--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告は抑制します。

--output -o

出力形式。

承認された値: json, jsonc, none, table, tsv, yaml, yamlc
既定値: json
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ をご覧ください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

--verbose

ログの詳細レベルを上げます。 詳細なデバッグ ログを表示するには --debug を使います。

az aks maintenanceconfiguration show

マネージド Kubernetes クラスターのメインテナント構成の詳細を表示します。

az aks maintenanceconfiguration show --cluster-name
                                     --name
                                     --resource-group

必須のパラメーター

--cluster-name

クラスター名。

--name -n

構成名。

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name> を使用して、既定のグループを構成できます。

グローバル パラメーター
--debug

すべてのデバッグ ログを表示するようにログの詳細レベルを上げます。

--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告は抑制します。

--output -o

出力形式。

承認された値: json, jsonc, none, table, tsv, yaml, yamlc
既定値: json
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ をご覧ください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

--verbose

ログの詳細レベルを上げます。 詳細なデバッグ ログを表示するには --debug を使います。

az aks maintenanceconfiguration update

マネージド Kubernetes クラスターのメインテナント構成を更新します。

az aks maintenanceconfiguration update --cluster-name
                                       --name
                                       --resource-group
                                       [--config-file]
                                       [--day-of-month]
                                       [--day-of-week]
                                       [--duration]
                                       [--interval-days]
                                       [--interval-months]
                                       [--interval-weeks]
                                       [--schedule-type {AbsoluteMonthly, Daily, RelativeMonthly, Weekly}]
                                       [--start-date]
                                       [--start-hour]
                                       [--start-time]
                                       [--utc-offset]
                                       [--week-index {First, Fourth, Last, Second, Third}]
                                       [--weekday]

既定のメインテナント構成を --weekday と --start-hour で更新します。

az aks maintenanceconfiguration update -g MyResourceGroup --cluster-name test1 -n default --weekday Monday  --start-hour 1
  The maintenance is allowed on Monday 1:00am to 2:00am

既定のメインテナント構成を --weekday で更新します。メインテナントは、その日の任意の時刻に許可されます。

az aks maintenanceconfiguration update -g MyResourceGroup --cluster-name test1 -n default --weekday Monday
  The maintenance is allowed on Monday.

既定のメインテナント構成を メインtenance 構成 json ファイルで更新する

az aks maintenanceconfiguration update -g MyResourceGroup --cluster-name test1 -n default --config-file ./test.json
    The content of json file looks below. It means the maintenance is allowed on UTC time Tuesday 1:00am - 3:00 am and Wednesday 1:00am - 2:00am, 6:00am-7:00am
    No maintenance is allowed from 2020-11-26T03:00:00Z to 2020-11-30T12:00:00Z and from 2020-12-26T03:00:00Z to 2020-12-26T12:00:00Z even if they are allowed in the above weekly setting
    {
          "timeInWeek": [
            {
              "day": "Tuesday",
              "hourSlots": [
                1,
                2
              ]
            },
            {
              "day": "Wednesday",
              "hourSlots": [
                1,
                6
              ]
            }
          ],
          "notAllowedTime": [
            {
              "start": "2021-11-26T03:00:00Z",
              "end": "2021-11-30T12:00:00Z"
            },
            {
              "start": "2021-12-26T03:00:00Z",
              "end": "2021-12-26T12:00:00Z"
            }
          ]
  }

aksManagedNodeOSUpgradeSchedule メインtenance 構成を毎日のスケジュールで更新します。

az aks maintenanceconfiguration update -g MyResourceGroup --cluster-name test1 -n aksManagedNodeOSUpgradeSchedule --schedule-type Daily --interval-days 2 --duration 12 --utc-offset=-08:00 --start-date 2023-01-16 --start-time 00:00
  The maintenance is allowed from 00:00 to 12:00 (adjusted with UTC offset: -08:00) every two days. This configuration will be effective from 2023-01-16.

毎週のスケジュールで aksManagedNodeOSUpgradeSchedule メインテナント構成を更新します。

az aks maintenanceconfiguration update -g MyResourceGroup --cluster-name test1 -n aksManagedNodeOSUpgradeSchedule --schedule-type Weekly --day-of-week Friday --interval-weeks 3 --duration 8 --utc-offset +05:30 --start-date 2023-01-16 --start-time 09:30
  The maintenance is allowed on Friday from 09:30 to 17:30 (adjusted with UTC offset: +05:30) every three weeks. This configuration will be effective from 2023-01-16.

絶対月次スケジュールで aksManagedAutoUpgradeSchedule メインテナント構成を更新します。

az aks maintenanceconfiguration update -g MyResourceGroup --cluster-name test1 -n aksManagedAutoUpgradeSchedule --schedule-type AbsoluteMonthly --day-of-month 15 --interval-months 1 --duration 6 --utc-offset +05:30 --start-date 2023-01-16 --start-time 09:30
  The maintenance is allowed on the 15th of the month from 09:30 to 15:30 (adjusted with UTC offset: +05:30) every month. This configuration will be effective from 2023-01-16.

相対月次スケジュールで aksManagedAutoUpgradeSchedule メインテナント構成を更新します。

az aks maintenanceconfiguration update -g MyResourceGroup --cluster-name test1 -n aksManagedAutoUpgradeSchedule --schedule-type RelativeMonthly --day-of-week Tuesday --week-index Last --interval-months 3 --duration 6 --start-date 2023-01-16 --start-time 09:30
  The maintenance is allowed on the last Tuesday from 09:30 to 15:30 in default UTC time every 3 months. This configuration will be effective from 2023-01-16.

json ファイルを使用して aksManagedAutoUpgradeSchedule メインtenance 構成を更新します。

az aks maintenanceconfiguration update -g MyResourceGroup --cluster-name test1 -n aksManagedAutoUpgradeSchedule --config-file ./test.json
    The content of json file looks below. It means the maintenance is allowed on the 1st of the month from 09:00 to 13:00 (adjusted with UTC offset: -08:00) every 3 months, and this configuration will be effective from 2023-01-16.
    No maintenance is allowed from 2022-12-23 to 2023-01-05 and from 2023-11-23 to 2023-11-26 even if they are allowed in the above monthly setting
    {
        "maintenanceWindow": {
            "schedule": {
                "absoluteMonthly": {
                    "intervalMonths": 3,
                    "dayOfMonth": 1
                }
            },
            "durationHours": 4,
            "utcOffset": "-08:00",
            "startTime": "09:00",
            "notAllowedDates": [
                {
                    "start": "2022-12-23",
                    "end": "2023-01-05"
                },
                {
                    "start": "2023-11-23",
                    "end": "2023-11-26"
                }
            ]
        }
    }

必須のパラメーター

--cluster-name

クラスター名。

--name -n

構成名。

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name> を使用して、既定のグループを構成できます。

省略可能のパラメーター

--config-file

メインテナント構成 json ファイル。

--day-of-month

メインテナントが発生する月の日付を指定します。 たとえば、1 は月の 1 番目を示します。 絶対月次スケジュールの種類にのみ適用されます。

--day-of-week

メインの曜日を指定します。 例: "Monday"。 週単位および相対月単位のスケジュールの種類に適用されます。

--duration

メインテナント ウィンドウの長さは、4 時間から 24 時間の範囲です。

--interval-days

日単位のスケジュールの種類の各出現のセット間の日数。

--interval-months

各出現回数の間の月数。 絶対および相対月次スケジュールの種類に適用されます。

--interval-weeks

各出現のセット間の週数。 週単位のスケジュールの種類にのみ適用されます。

--schedule-type

メインテナント スケジュールには、'Daily'、'Weekly'、'AbsoluteMonthly' または 'RelativeMonthly' のいずれかを選択します。 'aksManagedAutoUpgradeSchedule' および 'aksManagedNodeOSUpgradeSchedule' メインテナント構成にのみ適用されます。

承認された値: AbsoluteMonthly, Daily, RelativeMonthly, Weekly
--start-date

メインテナント構成がアクティブ化される日付。 指定しない場合、メインテナント ウィンドウはすぐにアクティブになります。"。

--start-hour

メインテナントが許可されている 1 時間の開始時刻。 たとえば、1 は 1:00 am から 2:00 am の間に許可されます。 既定のメインテナント構成にのみ適用されます。

--start-time

メインテナント ウィンドウの開始時刻。 指定できる値は、'00:00' から '23:59' までです。 '--utc-offset' はこのフィールドに適用されます。 たとえば、'--utc-offset +02:00' の '02:00' は UTC 時刻 '00:00' を意味します。

--utc-offset

形式 +/-HH:mm の UTC オフセット。 たとえば、IST の場合は '+05:30'、PST の場合は '-07:00' などです。 指定しない場合、既定値は '+00:00' です。

--week-index

"--day-of-week" で指定した許容日数のインスタンスを指定して、メインを実行します。 相対月次スケジュールの種類にのみ適用されます。

承認された値: First, Fourth, Last, Second, Third
--weekday

メインテナントが許可される曜日。 例: 月曜日 既定のメインテナント構成にのみ適用されます。

グローバル パラメーター
--debug

すべてのデバッグ ログを表示するようにログの詳細レベルを上げます。

--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告は抑制します。

--output -o

出力形式。

承認された値: json, jsonc, none, table, tsv, yaml, yamlc
既定値: json
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ をご覧ください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

--verbose

ログの詳細レベルを上げます。 詳細なデバッグ ログを表示するには --debug を使います。