Skip to content

AKS: System node pool VM size is hardcoded to Standard_D2s_v5 with no override #16283

@maddymontaquila

Description

@maddymontaquila

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When using addAzureKubernetesEnvironment with a custom node pool via addNodePool('default', { vmSize: 'Standard_B2s' }), the generated Bicep always includes a hardcoded system agent pool with vmSize: 'Standard_D2s_v5' in addition to the user-specified pool.

If your subscription has quota restrictions that don't allow Standard_D2s_v5 in the target region, the deployment fails and there's no way to override the system pool's VM size.

Generated Bicep (aksenv.bicep)

agentPoolProfiles: [
  {
    name: 'system'
    count: 1
    vmSize: 'Standard_D2s_v5'   // ← hardcoded, no way to override
    osType: 'Linux'
    mode: 'System'
  }
  {
    name: 'default'
    count: 1
    vmSize: 'Standard_B2s'      // ← this is from addNodePool()
    osType: 'Linux'
    mode: 'User'
  }
]

Error

The VM size of StandardD2sv5,Standard_B2s is not allowed in your subscription in location 'eastus'.

Expected Behavior

Either:

  1. Allow configuring the system pool VM size (e.g., addAzureKubernetesEnvironment('aksenv', { systemPoolVmSize: 'Standard_B2s' }))
  2. Or when a user adds a node pool, let them specify mode: 'System' to replace the default system pool

Steps To Reproduce

  1. Create an AppHost with addAzureKubernetesEnvironment('aksenv').addNodePool('default', { vmSize: 'Standard_B2s' })
  2. Deploy to a subscription/region where Standard_D2s_v5 is not available
  3. Deployment fails because the system pool VM size can't be changed

Aspire Version

  • Aspire CLI: daily channel
  • Aspire.Hosting.Azure.Kubernetes: 13.3.0-preview.1.26217.4

Additional context

Found during #AspiriFridays stream. Workaround was to deploy to a different region (swedencentral) where the default SKU is available, but that shouldn't be necessary.

/cc @mitchdenny

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions