kubectl-plugins

aks-maintenance

Manage AKS planned maintenance windows.

kubectl aks-maintenance <command> [NAME] [flags]

Uses the shared AKS flags. NAME is one of:

NameMeaning
defaultPlanned maintenance: weekly UTC hour slots
auto-upgradeWindow for cluster auto-upgrades (aksManagedAutoUpgradeSchedule)
node-osWindow for node OS upgrades (aksManagedNodeOSUpgradeSchedule)

Commands

list, show NAME, add NAME (create or replace) and delete NAME.

add flags

FlagApplies toDescription
--dayall (required)Day of the week, for example Sunday
--start-timeauto-upgrade, node-osHH:mm, default 02:00
--duration-hoursauto-upgrade, node-os4 to 24, default 4
--interval-weeksauto-upgrade, node-osWeeks between windows, default 1
--utc-offsetauto-upgrade, node-os+/-HH:mm offset for the start time
--hoursdefaultUTC hours 0 to 23, for example 1,2
kubectl aks-maintenance add node-os --day Sunday --start-time 02:00 --duration-hours 4
kubectl aks-maintenance add auto-upgrade --day Saturday --utc-offset -05:00
kubectl aks-maintenance add default --day Monday --hours 1,2
kubectl aks-maintenance list

add creates weekly schedules only. Existing daily or monthly schedules are shown by list and show but cannot be created with this plugin.

The binary is named kubectl-aks_maintenance; make install creates it.