Jaa


az aks maintenanceconfiguration

Note

This command group has commands that are defined in both Azure CLI and at least one extension. Install each extension to benefit from its extended capabilities. Learn more about extensions.

Commands to manage maintenance configurations in managed Kubernetes cluster.

Commands

Name Description Type Status
az aks maintenanceconfiguration add

Add a maintenance configuration in managed Kubernetes cluster.

Core GA
az aks maintenanceconfiguration add (aks-preview extension)

Add a maintenance configuration in managed Kubernetes cluster.

Extension GA
az aks maintenanceconfiguration delete

Delete a maintenance configuration in managed Kubernetes cluster.

Core GA
az aks maintenanceconfiguration delete (aks-preview extension)

Delete a maintenance configuration in managed Kubernetes cluster.

Extension GA
az aks maintenanceconfiguration list

List maintenance configurations in managed Kubernetes cluster.

Core GA
az aks maintenanceconfiguration list (aks-preview extension)

List maintenance configurations in managed Kubernetes cluster.

Extension GA
az aks maintenanceconfiguration show

Show the details of a maintenance configuration in managed Kubernetes cluster.

Core GA
az aks maintenanceconfiguration show (aks-preview extension)

Show the details of a maintenance configuration in managed Kubernetes cluster.

Extension GA
az aks maintenanceconfiguration update

Update a maintenance configuration of a managed Kubernetes cluster.

Core GA
az aks maintenanceconfiguration update (aks-preview extension)

Update a maintenance configuration of a managed Kubernetes cluster.

Extension GA

az aks maintenanceconfiguration add

Add a maintenance configuration in managed Kubernetes cluster.

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]

Examples

Add default maintenance configuration with --weekday and --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

Add default maintenance configuration with --weekday. The maintenance is allowd on any time of that day.

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

Add default maintenance configuration with maintenance configuration json file

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"
            }
          ]
  }

Add aksManagedNodeOSUpgradeSchedule maintenance configuration with daily schedule.

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.

Add aksManagedNodeOSUpgradeSchedule maintenance configuration with weekly schedule.

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.

Add aksManagedAutoUpgradeSchedule maintenance configuration with absolute monthly schedule.

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.

Add aksManagedAutoUpgradeSchedule maintenance configuration with relative monthly schedule.

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.

Add aksManagedAutoUpgradeSchedule maintenance configuration with json file.

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"
                }
            ]
        }
    }

Required Parameters

--cluster-name

The cluster name.

--name -n

The config name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--config-file

The maintenance configuration json file.

--day-of-month

Specify on which day of the month the maintenance occurs. E.g. 1 indicates the 1st of the month. Applicable to absolute monthly schedule type only.

--day-of-week

Specify on which day of the week the maintenance occurs. E.g. "Monday". Applicable to weekly and relative monthly schedule types.

--duration

The length of maintenance window range from 4 to 24 hours.

--interval-days

The number of days between each set of occurrences for daily schedule type.

--interval-months

The number of months between each set of occurrences. Applicable to absolute and relative monthly schedule types.

--interval-weeks

The number of weeks between each set of occurrences. Applicable to weekly schedule types only.

--schedule-type

Choose either 'Daily', 'Weekly', 'AbsoluteMonthly' or 'RelativeMonthly' for your maintenance schedule. Only applicable to 'aksManagedAutoUpgradeSchedule' and 'aksManagedNodeOSUpgradeSchedule' maintenance configuration.

Accepted values: AbsoluteMonthly, Daily, RelativeMonthly, Weekly
--start-date

The date the maintenance configuration activates. If not specified, the maintenance window will be active right away.".

--start-hour

The start time of 1 hour window which maintenance is allowd. E.g. 1 means it's allowd between 1:00 am and 2:00 am. Applicable to default maintenance configuration only.

--start-time

The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. '--utc-offset' applies to this field. For example, '02:00' with '--utc-offset +02:00' means UTC time '00:00'.

--utc-offset

The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is '+00:00'.

--week-index

Specify on which instance of the allowed days specified in '--day-of-week' the maintenance occurs. Applicable to relative monthly schedule type only.

Accepted values: First, Fourth, Last, Second, Third
--weekday

A day in week on which maintenance is allowed. E.g. Monday. Applicable to default maintenance configuration only.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks maintenanceconfiguration add (aks-preview extension)

Add a maintenance configuration in managed Kubernetes cluster.

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]

Examples

Add default maintenance configuration with --weekday and --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

Add default maintenance configuration with --weekday. The maintenance is allowd on any time of that day.

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

Add default maintenance configuration with maintenance configuration json file

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"
            }
          ]
  }

Add aksManagedNodeOSUpgradeSchedule maintenance configuration with daily schedule.

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.

Add aksManagedNodeOSUpgradeSchedule maintenance configuration with weekly schedule.

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.

Add aksManagedAutoUpgradeSchedule maintenance configuration with absolute monthly schedule.

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.

Add aksManagedAutoUpgradeSchedule maintenance configuration with relative monthly schedule.

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.

Add aksManagedAutoUpgradeSchedule maintenance configuration with json file.

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"
                }
            ]
        }
    }

Required Parameters

--cluster-name

The cluster name.

--name -n

The config name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--config-file

The maintenance configuration json file.

--day-of-month

Specify on which day of the month the maintenance occurs. E.g. 1 indicates the 1st of the month. Applicable to absolute monthly schedule type only.

--day-of-week

Specify on which day of the week the maintenance occurs. E.g. "Monday". Applicable to weekly and relative monthly schedule types.

--duration

The length of maintenance window range from 4 to 24 hours.

--interval-days

The number of days between each set of occurrences for daily schedule type.

--interval-months

The number of months between each set of occurrences. Applicable to absolute and relative monthly schedule types.

--interval-weeks

The number of weeks between each set of occurrences. Applicable to weekly schedule types only.

--schedule-type

Choose either 'Daily', 'Weekly', 'AbsoluteMonthly' or 'RelativeMonthly' for your maintenance schedule. Only applicable to 'aksManagedAutoUpgradeSchedule' and 'aksManagedNodeOSUpgradeSchedule' maintenance configuration.

Accepted values: AbsoluteMonthly, Daily, RelativeMonthly, Weekly
--start-date

The date the maintenance configuration activates. If not specified, the maintenance window will be active right away.".

--start-hour

The start time of 1 hour window which maintenance is allowd. E.g. 1 means it's allowd between 1:00 am and 2:00 am. Applicable to default maintenance configuration only.

--start-time

The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. '--utc-offset' applies to this field. For example, '02:00' with '--utc-offset +02:00' means UTC time '00:00'.

--utc-offset

The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is '+00:00'.

--week-index

Specify on which instance of the allowed days specified in '--day-of-week' the maintenance occurs. Applicable to relative monthly schedule type only.

Accepted values: First, Fourth, Last, Second, Third
--weekday

A day in week on which maintenance is allowed. E.g. Monday. Applicable to default maintenance configuration only.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks maintenanceconfiguration delete

Delete a maintenance configuration in managed Kubernetes cluster.

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

Required Parameters

--cluster-name

The cluster name.

--name -n

The config name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks maintenanceconfiguration delete (aks-preview extension)

Delete a maintenance configuration in managed Kubernetes cluster.

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

Required Parameters

--cluster-name

The cluster name.

--name -n

The config name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks maintenanceconfiguration list

List maintenance configurations in managed Kubernetes cluster.

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

Required Parameters

--cluster-name

The cluster name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks maintenanceconfiguration list (aks-preview extension)

List maintenance configurations in managed Kubernetes cluster.

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

Required Parameters

--cluster-name

The cluster name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks maintenanceconfiguration show

Show the details of a maintenance configuration in managed Kubernetes cluster.

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

Required Parameters

--cluster-name

The cluster name.

--name -n

The config name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks maintenanceconfiguration show (aks-preview extension)

Show the details of a maintenance configuration in managed Kubernetes cluster.

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

Required Parameters

--cluster-name

The cluster name.

--name -n

The config name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks maintenanceconfiguration update

Update a maintenance configuration of a managed Kubernetes cluster.

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]

Examples

Update default maintenance configuration with --weekday and --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

Update default maintenance configuration with --weekday.The maintenance is allowd on any time of that day.

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

Update default maintenance configuration with maintenance configuration json file

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"
            }
          ]
  }

Update aksManagedNodeOSUpgradeSchedule maintenance configuration with daily schedule.

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.

Update aksManagedNodeOSUpgradeSchedule maintenance configuration with weekly schedule.

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.

Update aksManagedAutoUpgradeSchedule maintenance configuration with absolute monthly schedule.

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.

Update aksManagedAutoUpgradeSchedule maintenance configuration with relative monthly schedule.

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.

Update aksManagedAutoUpgradeSchedule maintenance configuration with json file.

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"
                }
            ]
        }
    }

Required Parameters

--cluster-name

The cluster name.

--name -n

The config name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--config-file

The maintenance configuration json file.

--day-of-month

Specify on which day of the month the maintenance occurs. E.g. 1 indicates the 1st of the month. Applicable to absolute monthly schedule type only.

--day-of-week

Specify on which day of the week the maintenance occurs. E.g. "Monday". Applicable to weekly and relative monthly schedule types.

--duration

The length of maintenance window range from 4 to 24 hours.

--interval-days

The number of days between each set of occurrences for daily schedule type.

--interval-months

The number of months between each set of occurrences. Applicable to absolute and relative monthly schedule types.

--interval-weeks

The number of weeks between each set of occurrences. Applicable to weekly schedule types only.

--schedule-type

Choose either 'Daily', 'Weekly', 'AbsoluteMonthly' or 'RelativeMonthly' for your maintenance schedule. Only applicable to 'aksManagedAutoUpgradeSchedule' and 'aksManagedNodeOSUpgradeSchedule' maintenance configuration.

Accepted values: AbsoluteMonthly, Daily, RelativeMonthly, Weekly
--start-date

The date the maintenance configuration activates. If not specified, the maintenance window will be active right away.".

--start-hour

The start time of 1 hour window which maintenance is allowd. E.g. 1 means it's allowd between 1:00 am and 2:00 am. Applicable to default maintenance configuration only.

--start-time

The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. '--utc-offset' applies to this field. For example, '02:00' with '--utc-offset +02:00' means UTC time '00:00'.

--utc-offset

The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is '+00:00'.

--week-index

Specify on which instance of the allowed days specified in '--day-of-week' the maintenance occurs. Applicable to relative monthly schedule type only.

Accepted values: First, Fourth, Last, Second, Third
--weekday

A day in week on which maintenance is allowed. E.g. Monday. Applicable to default maintenance configuration only.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks maintenanceconfiguration update (aks-preview extension)

Update a maintenance configuration of a managed Kubernetes cluster.

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]

Examples

Update default maintenance configuration with --weekday and --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

Update default maintenance configuration with --weekday.The maintenance is allowd on any time of that day.

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

Update default maintenance configuration with maintenance configuration json file

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"
            }
          ]
  }

Update aksManagedNodeOSUpgradeSchedule maintenance configuration with daily schedule.

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.

Update aksManagedNodeOSUpgradeSchedule maintenance configuration with weekly schedule.

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.

Update aksManagedAutoUpgradeSchedule maintenance configuration with absolute monthly schedule.

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.

Update aksManagedAutoUpgradeSchedule maintenance configuration with relative monthly schedule.

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.

Update aksManagedAutoUpgradeSchedule maintenance configuration with json file.

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"
                }
            ]
        }
    }

Required Parameters

--cluster-name

The cluster name.

--name -n

The config name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--config-file

The maintenance configuration json file.

--day-of-month

Specify on which day of the month the maintenance occurs. E.g. 1 indicates the 1st of the month. Applicable to absolute monthly schedule type only.

--day-of-week

Specify on which day of the week the maintenance occurs. E.g. "Monday". Applicable to weekly and relative monthly schedule types.

--duration

The length of maintenance window range from 4 to 24 hours.

--interval-days

The number of days between each set of occurrences for daily schedule type.

--interval-months

The number of months between each set of occurrences. Applicable to absolute and relative monthly schedule types.

--interval-weeks

The number of weeks between each set of occurrences. Applicable to weekly schedule types only.

--schedule-type

Choose either 'Daily', 'Weekly', 'AbsoluteMonthly' or 'RelativeMonthly' for your maintenance schedule. Only applicable to 'aksManagedAutoUpgradeSchedule' and 'aksManagedNodeOSUpgradeSchedule' maintenance configuration.

Accepted values: AbsoluteMonthly, Daily, RelativeMonthly, Weekly
--start-date

The date the maintenance configuration activates. If not specified, the maintenance window will be active right away.".

--start-hour

The start time of 1 hour window which maintenance is allowd. E.g. 1 means it's allowd between 1:00 am and 2:00 am. Applicable to default maintenance configuration only.

--start-time

The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. '--utc-offset' applies to this field. For example, '02:00' with '--utc-offset +02:00' means UTC time '00:00'.

--utc-offset

The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is '+00:00'.

--week-index

Specify on which instance of the allowed days specified in '--day-of-week' the maintenance occurs. Applicable to relative monthly schedule type only.

Accepted values: First, Fourth, Last, Second, Third
--weekday

A day in week on which maintenance is allowed. E.g. Monday. Applicable to default maintenance configuration only.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.