Clusters / Template
Azure AKS Cluster
Deploy a managed Kubernetes cluster on Azure AKS
Overview
Azure subscription with appropriate permissions. You must run the `cloud connect` command first to grant the platform secure access to your Azure subscription.
- Category
- Clusters
- Source
- clusters/azure/aks/new-vnet.yaml
Prerequisites & dependencies
- Your Azure subscription ID and resource group are required
- You must run the cloud connect command first: `astroctl cloud azure connect --subscription-id <subscription-id> --resource-group <resource-group> --cluster-name <cluster-name> --region <region>`
No dependencies are listed in the available catalog metadata. This is not a guarantee that none are required.
Source manifest
clusters/azure/aks/new-vnet.yaml
# AKS cluster in a new virtual network
#
# Before you apply:
# 1. Find your subscription ID: az account show --query id -o tsv
# 2. Create a resource group if you need one:
# az group create --name <YOUR_RESOURCE_GROUP> --location <YOUR_REGION>
# 3. Connect the subscription, then run the script it saves:
# astroctl cloud azure connect --subscription-id <YOUR_SUBSCRIPTION_ID> --resource-group <YOUR_RESOURCE_GROUP> --cluster-name <YOUR_CLUSTER_NAME> --region <YOUR_REGION>
#
# Apply: astroctl infra k8s apply -f new-vnet.yaml --dry-run, then without --dry-run
# Docs: https://astropulse.io/docs/latest/platform/cluster-pipeline/features/provisioner/managed/aks
apiVersion: platform.astropulse.io/v1
kind: K8sCluster
spec:
clusterName: <YOUR_CLUSTER_NAME>
provider: azure
region: <YOUR_REGION> # the region you connected, such as eastus
provisioner:
type: aks
aks:
subscriptionId: "<YOUR_SUBSCRIPTION_ID>"
resourceGroup: "<YOUR_RESOURCE_GROUP>"
credentials:
type: Dynamic
clusterSpec:
dataPlane:
nodeGroups:
# The first node group is the system pool: lowercase letters and
# digits, at most 12 characters, and OnDemand (Azure refuses Spot there).
- name: systempool
minNode: 2
maxNode: 5
instanceType: OnDemand
machineTypes:
# List sizes: az vm list-skus --location <YOUR_REGION> --resource-type virtualMachines -o table
- Standard_D2s_v5
labels:
environment: dev
Deployment guidance
Go straight to Console to create clusters, deploy applications, and manage supported resources. Templates and CLI commands are optional; not every GitHub manifest has an automatic import path.
Console — start directly
Open Console to create or connect infrastructure and deploy applications without running astroctl or copying this YAML first. This template may still require manual setup.
Open Consoleastroctl
Get your Azure subscription ID
az account show --query id --output tsvConnect your Azure subscription
astroctl cloud azure connect --subscription-id <subscription-id> --resource-group <resource-group> --cluster-name <cluster-name> --region <region>Deploy the Azure AKS cluster
astroctl infra k8s apply -f clusters/azure/aks/new-vnet.yamlGet the AKS cluster details
astroctl infra k8s get <YOUR_CLUSTER_NAME>Get the stream of cluster creation progress
astroctl infra k8s progress stream <YOUR_CLUSTER_NAME>Generates kubeconfig and sets the context
astroctl infra k8s set-context <YOUR_CLUSTER_NAME>Any kubectl command can be used to manage the cluster
kubectl ... Delete the AKS cluster
astroctl infra k8s delete <YOUR_CLUSTER_NAME>Review placeholders and permissions before running commands. Nothing executes from this page.
Nova
Prefer to describe the goal? Ask Nova to review this example and help plan supported actions. Access, policy, and approvals still apply.