Why AKS with Ankra
- A catalogue for the location you pick - Kubernetes versions, VM sizes, availability zones, subnets and prices are read for the selected Azure location, and sizes your subscription cannot launch there are left out.
- Spot node pools, zones and OS disks - run a User pool on spot capacity with an optional price cap, spread a pool across availability zones, and choose a managed or ephemeral OS disk per pool.
- Bring your own network - place every node pool in an existing virtual network subnet, or let AKS create its VNet.
- Planned maintenance - pin the weekly window in which Azure may run control-plane upgrades and node reboots.
- Stop and start - AKS is the only managed provider with native cluster stop/start, exposed in the portal, CLI, API and MCP.
- Retention-aware deletion - keep or delete the resource group Ankra created for the cluster; a resource group you brought is never deleted.
Before you start
- An Azure service principal stored in Ankra with the roles described in Azure Credentials. Store it from the portal or with
ankra credentials azure create. If you have none, the create form shows Add an Azure Kubernetes Service credential first with an Add a credential button. - A payment method on the organisation. Without one the review step warns “A payment method is required to create this cluster.” and the create is refused - see Billing.
- A role with the
clusters.createpermission. Without it Add a cluster reads “Your role does not allow creating clusters.”
Creating an AKS cluster
- Portal
- CLI
- API
1
Choose Azure, run by Azure
Open Infrastructure → Clusters → Add a cluster (
/next/clusters/new). Choose Microsoft Azure as the provider, then Provider managed under Who runs Kubernetes on Microsoft Azure?. The page now reads Add an Azure Kubernetes Service cluster.2
Name and purpose
Enter a Cluster name (Azure allows letters, digits, hyphens and underscores) and answer What will this cluster run? (Production, Staging, Development, Testing, Local or Something else). The answer is required before you can review.
3
Where it runs
Pick the Azure Kubernetes Service credential and a Region (for example
westeurope), then the Network plugin: Azure CNI (the default) or kubenet. Sizes and versions load for that region; the Estimated monthly cost panel fills in.4
Worker nodes
Each node group has a Group name, a number of Nodes and a Size for the group, and Scale this group automatically with At least and At most. Add a node group adds another. Open Placement, labels and taints on a group for node labels, taints, Pool zones, Node disk type, Node disk size in GB and Use spot capacity with an optional Maximum spot price per hour. Spot is disabled on the first group: “The first AKS pool runs system workloads and requires regular capacity.”
5
Kubernetes and Git
Pick a Kubernetes version or keep Provider default. Under Cluster configuration in Git, optionally choose a Git connection, Repository and Branch.
6
Advanced configuration
Open Advanced configuration for Azure cluster settings: an Existing resource group to adopt (leave it empty and Ankra creates one), the AKS service tier (Free, Standard or Premium), Use a private Kubernetes API endpoint, the Azure subnet (Create a network with the cluster, or a subnet in the region), and Schedule planned maintenance with Maintenance day (UTC), Start hour (UTC) and Maintenance duration in hours (between 4 and 24).
7
Review and create
Click Review cluster. The review page lists the settings and runs Checks before creating (the AKS preflight: credential, location, version, name, size availability, zones, OS disk support, vCPU quota, subnet). When they pass, click Create cluster. Ankra submits the cluster, follows it while Azure provisions it, retrieves the kubeconfig and installs the Ankra agent. The page reads Your cluster is ready when it is done.
AKS options
Node pool options
AKS node pool names are lowercase alphanumeric, start with a letter and are at most 12 characters; cluster names are at most 63 characters. The first pool is the cluster’s System pool: AKS requires at least one System pool, so Ankra refuses to delete the only one and refuses spot on it.
Preflight
Every create runs a preflight you can also call on its own (POST .../managed/aks/preflight with the create body). It checks the service principal, pool names, the location and version, a name collision in the resource group, that each VM size is available to your subscription in that location and offered in the requested zones, ephemeral OS disk support, the subscription’s regional and per-family vCPU quota against the pools’ maximum node counts (and the separate regional spot vCPU quota for spot pools), the subnet, and the maintenance window. Catalogue reads the service principal lacks permission for become warnings; a failing item blocks the create.
Verify
The create progress view follows the control plane, the node pools, kubeconfig retrieval and the Ankra Agent install. The cluster shows Online once the agent has connected. Then pointkubectl at it through Ankra - this needs a Cluster Access grant - and check that every node is Ready:
Day-2 operations
Node pools, upgrades, stop/start and deletion work from the portal, the CLI or the API. The CLI examples use--provider aks:
Upgrades
An upgrade moves the control plane and every node pool to the target version in one operation - the same requestaz aks upgrade sends. AKS refuses a control plane more than two minor versions ahead of a pool, so Ankra never leaves pools behind. Available targets come from Azure’s upgrade profile; preview versions are skipped.
In the portal, open Infrastructure → Clusters → <your cluster> → Settings → Upgrades and maintenance, pick the Version to upgrade to under Kubernetes version, click Review upgrade and confirm Upgrade to <version>.
Stopping and starting
AKS is the only managed provider with native cluster stop/start, and Ankra exposes it in the portal, the CLI, the API and MCP (stop_managed_cluster, start_managed_cluster). Stopping deallocates the control plane and agent pools (Azure stops billing for compute) while keeping all configuration; starting brings the same cluster back.
In the portal, open Infrastructure → Clusters → <your cluster> → Settings → Stop, start and schedules. Under Stop or start now, click Stop cluster (or Start cluster on a stopped one) and confirm. The section shows the State in Ankra and the Status at Microsoft Azure. Schedules are not offered for managed clusters: “Schedules are only for clusters Ankra built on servers it provisions.”
stopped or running once Azure completes the transition. Ankra advertises the capability per provider as supports_stop_start.
Importing an existing AKS cluster
Discover the clusters in your subscription and adopt one into Ankra without touching it - discovery and import run from the portal (Infrastructure → Clusters → Connect a cluster → Find a managed cluster), the CLI (ankra cluster managed discover --provider aks, then ankra cluster managed import --provider aks) or the API (see Managed Kubernetes - importing existing clusters). Import brings the cluster’s node pools, their zones, OS disks, spot settings, labels and taints into Ankra, and records the subnet the pools use.
Deleting, disconnecting and retention
These operations are deliberately different. Both are under Infrastructure → Clusters → <your cluster> → Settings → Terminate or remove, and both ask you to type the cluster’s name to confirm:- Disconnect from Ankra (button Disconnect cluster) removes the Ankra integration and cluster-local privileged material but never calls Azure. The AKS cluster keeps running, and Azure keeps charging for it. Use it for imported clusters.
- Delete the AKS cluster at Microsoft Azure (button Delete at Microsoft Azure) deletes the AKS cluster (Azure removes its
MC_node resource group with it) and then removes the Ankra integration. Continue past cleanup errors finishes even when Ankra cannot clean up everything. The portal offers this only for clusters Ankra created; for an imported cluster it says “Ankra did not create this cluster at Microsoft Azure, so it does not delete it there.” Through the API an imported cluster can be deleted with the explicit force option.
retention_policy=delete (the default) Ankra also deletes the resource group it created for the cluster. With retention_policy=retain that group survives and is reported in retained_resources; the portal sends delete and the CLI takes the default, so retain is an API parameter only. A resource group you named at creation is adopted: Ankra never deletes it and always reports it as retained.
Troubleshooting
- 403 on the resource group or subscription - the service principal lacks a role listed in Azure Credentials. Catalogue reads need
Readerat the subscription; creating clusters needs the AKS and network roles on the resource group. - Preflight fails on
quotaorquota.spot- the pools’ maximum node counts exceed the free regular or per-family vCPUs, or the spot pools exceed the regional spot (low-priority) vCPU quota, which Azure sizes separately and often at only a few vCPUs on new subscriptions. Request a quota increase for that location or pick smaller sizes. - VM size “not available to this subscription” - Azure restricts the SKU in that location for your subscription. The catalogue already omits such sizes; a size typed by hand is caught at preflight.
- “cannot run on spot capacity” - spot was requested on the first pool. Put spot workloads in a later pool.
- Import refused with “local accounts disabled” - see the warning under importing.
- Upgrade refused by Azure - a pool is more than two minor versions behind the target. Upgrade in steps of one minor version.