Azure AKS cluster
AstroPulse creates and runs an Azure Kubernetes Service cluster in a resource group of your own Azure subscription, and you pay Azure for it directly. Azure runs the control plane; you choose the node pools and AstroPulse manages them in your subscription. This page covers what is specific to AKS. The whole walkthrough is Create a cluster.
Before you start
-
The subscription ID, a GUID:
Terminalaz account show --query id -o tsv -
A resource group in that subscription. It must already exist: the setup does not create it. To make an empty one:
Terminalaz group create --name my-resource-group --location eastus -
An Azure account that can assign roles on that resource group and register resource providers on the subscription, for example Owner.
-
Room in the subscription's vCPU quotas for the VM sizes you pick. For GPUs, compare models, zones and prices first under Infrastructure › Accelerators.
In the console
Create a cluster walks through every step. What is particular to Azure:
-
Name and cloud. Pick Microsoft Azure under Cloud, then the Region.
-
Account. Under How Kubernetes runs, pick Azure Kubernetes Service. Under Your cloud account, enter the Subscription ID and the Resource Group, or pick a subscription listed after Connected:, which fills in both.
Open zoom view -
Connect. Select Connect this account, then run the setup the step shows in Azure Cloud Shell, signed in to the tenant that owns the subscription (Connect your Azure subscription).
Open zoom view -
Kubernetes. Pick a Kubernetes Version, an Auto-Upgrade Channel and a Node OS Upgrade Channel. Enable Workload Identity and Enable OIDC Issuer are on. Add Tags if you want them on the cluster.
Open zoom view -
Network. Leave Use Existing VNet (BYO VNet) off for a new VNet, or turn it on to use a subnet of your own (Bring your own VNet).
Open zoom view -
Node groups. Each node pool has a Minimum nodes and Maximum nodes. The first one is the system pool, and must be On-Demand.
You should see
The cluster's page in Infrastructure › Kubernetes reads Ready once AKS has created it and its node pools are up. Its Events tab shows each step, and says why if one fails.
Connect your Azure subscription
AstroPulse never holds an Azure secret for your subscription. The connect setup adds the AstroPulse application to your tenant and gives it roles on the cluster's resource group only. Connect once per cluster, before you create it.
Connect this account makes a setup script for this cluster. Run it in Azure Cloud Shell, or in any terminal where az is signed in to the subscription's tenant. It stops before it changes anything if the signed-in account cannot open the subscription. It then:
- Registers the resource providers AKS needs on the subscription.
- Adds the AstroPulse application to your tenant.
- Assigns it these roles on the resource group: Azure Kubernetes Service Contributor Role, Azure Kubernetes Service RBAC Cluster Admin and Managed Identity Contributor.
- Checks that everything is in place, and says "Setup complete" with the cluster and subscription.
A setup script runs only within 24 hours of being made, and stops after 15 minutes. If you later remove AstroPulse's access in your subscription, don't run an old script again, since it would grant it again.
Installing Vulnerability Scanning on a cluster later creates a managed identity for the scanner in the resource group and grants it AcrPull on the cluster's registries; removing the add-on removes them.
Node pools
AKS resizes each pool between its Minimum nodes and Maximum nodes as pods need room. Pools after the first can scale to 0. Pricing is On-Demand or Spot; Spot costs less, but Azure can take a node back at short notice.
The system pool
The first node group is always the AKS system pool, whatever its name. Azure runs cluster-critical pods there, so:
- It keeps at least 1 node: a minimum of 0 is refused. Scale a later pool to zero instead.
- It is On-Demand. Spot is refused by the dry run, because Azure refuses it.
- It cannot use a B-series VM.
- For production, give it at least 2 nodes, 3 across zones. With fewer, the dry run warns.
Quota and VM sizes
The dry run checks vCPU quota before anything is created. Quota / Capacity counts each pool's minimum nodes against its VM family and the region's total; Quota Headroom counts each pool's maximum nodes against its VM family. Both fail when the nodes need more vCPUs than the quota allows, because Azure refuses such a VM. Request an increase in the Azure portal under Subscriptions › Usage + quotas › Compute, or pick a VM size from a family with room.
Some subscriptions do not allow every VM size. To list the restricted ones in a region:
az vm list-skus --location eastus --resource-type virtualMachines \
--query "[?not_null(restrictions)].{name:name, reasonCode:restrictions[0].reasonCode}" \
-o table
For a GPU pool, choose Request GPU hardware and name the GPU model and Devices per node; AstroPulse picks the VM size. AKS installs the GPU driver, and AstroPulse the device plugin. GPU node groups need Kubernetes 1.36 or newer. See GPU node groups.
Bring your own VNet
Without your own VNet, a new one is created for the cluster. To use yours, turn on Use Existing VNet (BYO VNet) and enter the Subnet Resource ID:
/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Network/virtualNetworks/{vnet}/subnets/{subnet}
An Azure subnet spans every zone of its region, so one subnet is enough. It must be in the cluster's own subscription, with room for one address per node plus the five Azure reserves in every subnet. Its resource group may differ from the cluster's.
Network Plugin is Azure CNI (Recommended), Kubenet or None. Azure CNI runs in overlay mode: pods take addresses from a private overlay range, not from the subnet. Kubenet keeps pods on a separate network behind NAT.
Setup Commands under the field shows the az commands that make a VNet in the cluster's subscription, resource group and region:
az network vnet create \
--resource-group my-resource-group \
--name my-vnet \
--location eastus \
--address-prefix 10.0.0.0/8 \
--subnet-name aks-subnet \
--subnet-prefix 10.240.0.0/16 \
--subscription 00000000-0000-0000-0000-000000000000
az network vnet subnet show \
--resource-group my-resource-group \
--vnet-name my-vnet \
--name aks-subnet \
--query id -o tsv \
--subscription 00000000-0000-0000-0000-000000000000
More on the layout: Networking.
API access and registries
On the Network step, the configuration section below the VNet fields holds:
- Authorized IP Ranges: the CIDR blocks that may reach the Kubernetes API server, up to 200, added one at a time. Empty means any address. A range that is not a valid CIDR block is refused as you add it.
- Container registries (ACR): up to 20 registry resource IDs. AstroPulse grants the cluster AcrPull on each, so images pull with no secret, and the dry run checks it can. To find one:
az acr show --name <registry-name> --query id --output tsv.
Private Cluster is not available for managed AKS clusters. For a cluster with a private API server only, register it instead.
Versions
Kubernetes Version lists what AKS offers in the region; AstroPulse default uses the version AKS defaults to. In a manifest, <major>.<minor> picks the newest supported patch. To list them:
astroctl cloud azure k8s-versions -r eastus
AKS keeps the cluster current on its own through two channels:
| Value | Label | Meaning |
|---|---|---|
Stable | Stable | Upgrades to the latest patch of the previous minor version. |
Patch | Patch | Upgrades to the latest patch of the current minor version. |
Rapid | Rapid | Upgrades to the latest patch of the newest minor version. |
NodeImage | Node image | Upgrades the node image only. The Kubernetes version stays the same. |
None | None | Turns off automatic upgrades. |
| Value | Label | Meaning |
|---|---|---|
NodeImage | Node image | Updates nodes to the latest node image. Nodes are restarted. |
SecurityPatch | Security patch | Applies only security updates to the nodes. |
Unmanaged | Unmanaged | Nodes install operating system updates themselves, outside AKS. |
None | None | Turns off automatic node operating system updates. |
The Node Image auto-upgrade channel runs only with the Node Image node OS channel; the console offers only that pair.
Updates and upgrades
Upgrades, node pool changes and rollback are on the cluster's Update and Node groups tabs, with a dry run before each change. AstroPulse plans every upgrade one minor version at a time. AKS upgrades a pool by adding surge nodes before it drains old ones, so keep vCPU quota for them; the upgrade's dry run checks it. See Cluster management.
Version discovery
Start with the versions and upgrade paths the platform currently returns for this cluster. The console upgrade wizard reads the same list.
# Versions available to this cluster
astroctl infra k8s upgrade <cluster-name> --list-versions
# Versions and upgrade paths available in the region
astroctl cloud azure k8s-versions -r eastus
astroctl cloud azure k8s-versions --show-upgrade-paths
Kubernetes version upgrade
Preview first, review the readiness report, then run the approved upgrade.
# Preview and validate
astroctl infra k8s upgrade <cluster-name> <next-version> --dry-run
# Generate the readiness report
astroctl infra k8s upgrade <cluster-name> <next-version> --generate-report
# Run the approved upgrade
astroctl infra k8s upgrade <cluster-name> <next-version>
Other ways in
- Nova: ask it, for example "create an AKS cluster in my connected subscription with a two-node system pool". It shows you the manifest and its dry run before it creates anything.
- SDK and API: the same operations, in the API reference.
With astroctl
astroctl cloud azure connect --subscription-id 00000000-0000-0000-0000-000000000000 --resource-group my-resource-group --region eastus --cluster-name aks-prod
bash astro-azure-setup-aks-prod.sh
astroctl infra k8s template aks > aks-prod.yaml
astroctl infra k8s apply -f aks-prod.yaml --dry-run
astroctl infra k8s apply -f aks-prod.yaml
connect saves the setup script as astro-azure-setup-<cluster-name>.sh (--output names it) and waits while you run it. Use the same cluster name, resource group and region in the manifest. Every flag: astroctl cloud azure connect and astroctl infra k8s apply.
Settings
The AKS fields. astroctl infra k8s template aks --schema lists every field.
provisioner.aks.subscriptionIdRequiredThe Azure subscription the cluster is created in.
provisioner.aks.resourceGroupRequiredThe existing resource group the cluster is created in.
provisioner.aks.kubernetesVersion<major>.<minor> or <major>.<minor>.<patch>.
provisioner.aks.autoUpgradeChannelHow AKS upgrades the cluster. What each channel means is on Azure's cluster auto-upgrade page. When both channels are omitted, AstroPulse sets this to Stable and nodeOsUpgradeChannel to NodeImage; when only this one is omitted, AKS's own default applies.
StableStable Upgrades to the latest patch of the previous minor version.PatchPatch Upgrades to the latest patch of the current minor version.RapidRapid Upgrades to the latest patch of the newest minor version.NodeImageNode image Upgrades the node image only. The Kubernetes version stays the same.NoneNone Turns off automatic upgrades.
provisioner.aks.nodeOsUpgradeChannelHow AKS updates the nodes' OS. What each channel means is on Azure's node OS auto-upgrade page. When both channels are omitted, AstroPulse sets this to NodeImage and autoUpgradeChannel to Stable; when only this one is omitted, AKS's own default applies. Only NodeImage with autoUpgradeChannel: NodeImage.
NodeImageNode image Updates nodes to the latest node image. Nodes are restarted.SecurityPatchSecurity patch Applies only security updates to the nodes.UnmanagedUnmanaged Nodes install operating system updates themselves, outside AKS.NoneNone Turns off automatic node operating system updates.
provisioner.aks.enableWorkloadIdentityLets pods authenticate to Azure services without keys. Needs the OIDC issuer.
trueprovisioner.aks.enableOidcIssuerThe cluster's OIDC issuer. Stays on while Workload Identity is on.
true when Workload Identity is on.provisioner.aks.tagsAzure tags on the cluster.
< > % & \ ? /; a value at most 256.provisioner.aks.vnetSubnetIdThe full resource ID of your subnet, in the cluster's subscription.
provisioner.aks.networkPluginAzure runs in overlay mode, set by networkPluginMode below.
AzureAzure CNI Pods get addresses from Azure's container networking.KubenetKubenet Pods get addresses from a range only the cluster uses; Azure is retiring it.NoneNone AKS installs no network plugin; you bring your own.
Azure
provisioner.aks.networkPluginModeWith networkPlugin: Azure only.
OverlayOverlay Pods get addresses from a private range, not from the virtual network's subnet.
Overlay
provisioner.aks.authorizedIPRangesCIDR blocks allowed to reach the Kubernetes API server.
provisioner.aks.acrResourceIdsRegistries the cluster pulls from with no secret.
If it's refused
az account show --query id -o tsv and paste what it prints.az network vnet subnet show ... --query id -o tsv command above.enableOidcIssuer: false, or turn Workload Identity off too.NodeImage auto-upgrade channel is paired with another node OS channel.nodeOsUpgradeChannel: NodeImage, or pick another auto-upgrade channel.privateCluster: true.Next
- Create a cluster, the full walkthrough
- Networking
- Cluster access with kubectl
- Cluster add-ons