At Microsoft Ignite (March 2021) the AKS team announced maintenance windows are now in public preview. But for some reason they release no docs relating to it, just an arm snippet. So, I decided to do some digging. First, I looked for the aks-preview az cli extension on GitHub to see if there have been any updates, and to my luck just two days ago from writing this post someone committed some changes for maintenance windows. I looked at the code and managed to figure out the command I would need. az aks maintenanceconfiguration. So, I went and updated my az aks-preview extension by using az extension update -n aks-preview and below I will go through my findings.
The first command to run is help.
The output looked like this.
Ok, so I don’t have a maintenance window let’s look at the help file for the add command.
The output should be something like this.
Awesome, we have some examples. Let’s try adding it to one of my clusters using the following command.
Looking at the output, it does not seem to do much yet. But in the help, it did mention about using a json file also. Let’s give that a go.
The json file needs to have something like below.
Now let’s try the following to see if it applies.
Again, this does look to me that nothing has applied. To remove the polices you can use the delete command. But for now, I will leave them active to see if they ever show up.
That’s it for the first look, I think I will wait for the docs before I spend any more time on this.
Let me know your thoughts by reaching out to me here or via social. Thanks for reading.
2 Comments
Eelco · March 23, 2021 at 2:33 pm
Nice article! The documentation is available at: https://docs.microsoft.com/en-us/azure/aks/planned-maintenance
Did you ever get auto-upgrade for AKS to update your AKS cluster in the predefined window? I’m testing with the feature and I know its preview, but I haven’t seen any upgrades on my AKS cluster yet.
Pixel Robots. · April 8, 2021 at 2:10 pm
I have not to be honest. I have not left a test cluster on long enough for it to update. Which update channel are you on? 1.20 has just gone GA so your cluster should have updated to that.