Azure CLI aksManagedNodeOSUpgradeSchedule not upgrading

296 Views Asked by At

I have a node pool that I have configured to have an upgrade window of Thursday, start time: 20:00, UTC Offset -07:00, on an intervalWeeks of 1 and a duration of 8 hours. This is the second week that I have checked to see if the version on the day following the upgrade schedule has resulted in an upgrade. I see no changes.

With the cli az aks show command and --query "agentPoolProfiles[*].{name: name, image:nodeImageVersion }" --output table

Name       Image
---------  ----------------------------------------
<redacted>  AKSUbuntu-2204gen2containerd-202307.27.0

The cli az aks nodepool get-upgrades with the query of --query "{ most_recent_node_version: latestNodeImageVersion, upgrades: upgrades }" --output table

Most_recent_node_version
----------------------------------------
AKSUbuntu-2204gen2containerd-202308.10.0

Or, the raw JSON of:

{
  "id": <redacted>,
  "kubernetesVersion": "1.26.6",
  "latestNodeImageVersion": "AKSUbuntu-2204gen2containerd-202308.10.0",
  "name": "default",
  "osType": "Linux",
  "resourceGroup": <redacted>,
  "type": "Microsoft.ContainerService/managedClusters/agentPools/upgradeProfiles",
  "upgrades": null
}

Are my queries telling me that my agent pool has a version of AKSUbuntu-2204gen2containerd-202307.27.0 and the most recent version is AKSUbuntu-2204gen2containerd-202308.10.0.

Shouldn't this be upgrading, if I am on week 2 of the following node os upgrade schedule?

{
    "id": <redacted>,
    "maintenanceWindow": {
      "durationHours": 8,
      "notAllowedDates": null,
      "schedule": {
        "absoluteMonthly": null,
        "daily": null,
        "relativeMonthly": null,
        "weekly": {
          "dayOfWeek": "Thursday",
          "intervalWeeks": 1
        }
      },
      "startDate": "2023-08-29",
      "startTime": "22:00",
      "utcOffset": "-07:00"
    },
    "name": "aksManagedNodeOSUpgradeSchedule",
    "notAllowedTime": null,
    "resourceGroup": <redacted>,
    "systemData": null,
    "timeInWeek": null,
    "type": null
  }

I'm expecting latestNodeImageVersion to match nodeImageVersion from my two different az cli commands.

2

There are 2 best solutions below

4
pauldotyu On BEST ANSWER

What does your autoUpgradeProfile look like when running the az aks show command on your cluster?

Also, what version of Kubernetes are you currently running?

If it is a version that is no longer supported by AKS (n-2 versions), then you'd have to get k8s upgraded to a supported version then the auto-updates should work after that.

0
Imran On

As per the github- blog by KAARTHIKEYAN - Kubernetes version 1.24 is now deprecated. Azure Linux image has been updated to AzureLinux-202308.22.0. As you have updated your Kubernetes version to 1.26.6 but image 7.27.0 is not updated.

To update your agent pool version automatically to the most recent version check the below steps:

Creating Kubernetes cluster, you can view automatic upgrade Enabled with node image this will update node os to the latest available image. Whenever new image is available for upgrade aks will upgrade automatically. But it's does not update Kubernetes version like below:

enter image description here

Now when I check the node pool It shows latest updated node pool like below:

az aks nodepool show --resource-group  <RGName> --cluster-name <clusterName> --nodepool-name userpool

enter image description here

In portal:

enter image description here