Azure / AKS

Azure Kubernetes Service
1.92k stars 284 forks source link

[BUG] Can't deploy standalone bicep agent pool with AzureLinux as sku type #4221

Closed jabbera closed 3 weeks ago

jabbera commented 1 month ago

Describe the bug

A standalone agent pool cannot be created with the osSku type of AzureLinux. An error occurs. Note. This resource is not being deployed at the same time as the cluster but after as a standalone arm template.

resource pool 'Microsoft.ContainerService/managedClusters/agentPools@2024-02-02-preview' = {
  name: '${aksName}/${poolName}'
  properties: {
    vmSize: sku
    vnetSubnetID: nodeSubnetId
    minCount: minCount
    count: count
    maxCount: maxCount
    osDiskSizeGB: cacheSize
    type: 'VirtualMachineScaleSets'
    mode: 'User'
    enableAutoScaling: autoscaleEnabled
    nodeTaints: nodeTaints
    nodeLabels: nodeLabels
    osType: 'Linux'
    maxPods: maxPods
    orchestratorVersion: aksVersion
    osSKU: 'AzureLinux'
    linuxOSConfig: {
      sysctls: {
        netIpv4TcpKeepaliveTime: 120
        netIpv4TcpkeepaliveIntvl: 10
        netIpv4TcpKeepaliveProbes: 3        
      }
    }
    scaleSetPriority: scaleSetPriority
    spotMaxPrice: -1
  }
}

To Reproduce Steps to reproduce the behavior:

  1. Use az deployment group create to deploy the above template
  2. See error:

The provided value for the template parameter 'osSku' is not valid. The value 'AzureLinux' is not part of the allowed value(s): 'Mariner,CBLMariner,Ubuntu'.'.", "additionalInfo": [{"type": "TemplateViolation", "info": {"lineNumber": 43, "linePosition": 24, "path": "properties.template.parameters.osSku.allowedValues"}

Expected behavior No error

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Additional context Add any other context about the problem here.

PixelRobots commented 1 month ago

I have just tested this on one of my clusters but using a few less values and it is working ok.

resource pool 'Microsoft.ContainerService/managedClusters/agentPools@2024-02-02-preview' = {
  name: 'aks-advlog-test-uks/test'
  properties: {
    vmSize: 'Standard_D4ds_v5'
    vnetSubnetID: 'redactedsubnetId'
    count: 1
    type: 'VirtualMachineScaleSets'
    mode: 'User'
    osType: 'Linux'
    osSKU: 'AzureLinux'
  }
}

Can you test again? and make sure your bicep is up to date if not already please.

jabbera commented 3 weeks ago

Confirmed!