AKS
KSail supports Azure Kubernetes Service (AKS) as a managed Kubernetes distribution via the Azure SDK. A declarative aks.yaml cluster specification defines the cluster shape; KSail provisions it and manages its lifecycle with the same commands used for local clusters.
AKS is the only distribution that uses the Azure provider. It is a cloud distribution — local mirror registries and local registry containers are not supported.
When to Use AKS
Section titled “When to Use AKS”AKS is ideal when you:
- Need a managed Azure Kubernetes cluster with full cloud integrations (Azure Load Balancer, Azure Disk, Azure CNI)
- Want to use the same KSail workflow (init → create → delete) for cloud clusters
- Require GitOps workflows (Flux or ArgoCD) on managed Azure infrastructure
For local development and testing, consider the Vanilla, K3s, or VCluster distributions instead.
What AKS Provides by Default
Section titled “What AKS Provides by Default”| Component | Status | Details |
|---|---|---|
| CNI | Built-in | Azure CNI |
| CSI | Built-in | Azure Disk CSI driver |
| LoadBalancer | Built-in | Azure-managed Service type LoadBalancer support |
| Metrics Server | Built-in | Provided by AKS |
Quick Start
Section titled “Quick Start”1. Initialize an AKS Project
Section titled “1. Initialize an AKS Project”mkdir my-aks-clustercd my-aks-cluster
ksail project init \ --name aks-default \ --distribution AKS \ --provider AzureThis generates:
ksail.yaml— KSail cluster configurationk8s/kustomization.yaml— directory for Kubernetes manifests
No aks.yaml is scaffolded — you author it when creating a cluster (see below).
2. Author aks.yaml
Section titled “2. Author aks.yaml”aks.yaml is an ARM ManagedCluster in YAML, using the ARM API’s camelCase field names. A minimal example:
name: aks-defaultlocation: swedencentralproperties: dnsPrefix: aks-default agentPoolProfiles: - name: default count: 1 vmSize: Standard_DS2_v2 mode: SystemCreating a cluster requires this file; operations on an existing cluster — read-only ones (list, info) and lifecycle ones (start, stop, delete) — work without it. Store it next to ksail.yaml, or point spec.cluster.distributionConfig at a custom path.
3. Set Credentials and Create the Cluster
Section titled “3. Set Credentials and Create the Cluster”az loginexport AZURE_SUBSCRIPTION_ID=00000000-0000-0000-0000-000000000000export AZURE_RESOURCE_GROUP=my-resource-group
ksail cluster createSee the Azure provider guide for the full credential and environment-variable reference.
Lifecycle
Section titled “Lifecycle”| Command | Effect |
|---|---|
ksail cluster create |
Provisions the cluster from aks.yaml and waits for completion |
ksail cluster delete |
Deletes the cluster |
ksail cluster stop |
AKS native stop — deallocates the whole cluster while keeping its state |
ksail cluster start |
AKS native start — restores the stopped cluster |
ksail cluster list |
Lists clusters in the subscription |
ksail cluster info |
Shows cluster details |
Limitations
Section titled “Limitations”- Cloud distribution — local Docker containers (mirrors, registries) are inaccessible from the cluster
- Only one provider is supported: Azure
- Cloud clusters incur Azure charges while running (stop deallocates compute to reduce cost)