Is there an existing issue for this?
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:
- Allow configuring the system pool VM size (e.g.,
addAzureKubernetesEnvironment('aksenv', { systemPoolVmSize: 'Standard_B2s' }))
- Or when a user adds a node pool, let them specify
mode: 'System' to replace the default system pool
Steps To Reproduce
- Create an AppHost with
addAzureKubernetesEnvironment('aksenv').addNodePool('default', { vmSize: 'Standard_B2s' })
- Deploy to a subscription/region where
Standard_D2s_v5 is not available
- 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
Is there an existing issue for this?
Describe the bug
When using
addAzureKubernetesEnvironmentwith a custom node pool viaaddNodePool('default', { vmSize: 'Standard_B2s' }), the generated Bicep always includes a hardcodedsystemagent pool withvmSize: 'Standard_D2s_v5'in addition to the user-specified pool.If your subscription has quota restrictions that don't allow
Standard_D2s_v5in the target region, the deployment fails and there's no way to override the system pool's VM size.Generated Bicep (aksenv.bicep)
Error
Expected Behavior
Either:
addAzureKubernetesEnvironment('aksenv', { systemPoolVmSize: 'Standard_B2s' }))mode: 'System'to replace the default system poolSteps To Reproduce
addAzureKubernetesEnvironment('aksenv').addNodePool('default', { vmSize: 'Standard_B2s' })Standard_D2s_v5is not availableAspire Version
Aspire.Hosting.Azure.Kubernetes: 13.3.0-preview.1.26217.4Additional 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