Search code examples
azureazure-aksnode-pools

Azure CLI aksManagedNodeOSUpgradeSchedule not upgrading


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.


Solution

  • 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.