AKS



Azure Kubernetes Service (AKS) is a managed container orchestration service that simplifies Kubernetes deployment and management in Azure.


Example yaml file:


apiVersion: azure.boundless.software/v1alpha1
kind: Aks
metadata:
  name: aks-sample
spec:
  provider:
    region: "eastus"
  name: "aks-sample"
  resourceGroupName: "my-resource-group"
  tags:
    environment: "production"
  sku:
    name: "Basic"
    tier: "Free"
  identity:
    type: "UserAssigned"
    userAssignedIdentities:
      - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-identity"
  properties:
    kubernetesVersion: "1.27.9"
    autoUpgradeProfile:
      upgradeChannel: "Patch"
    addonProfiles:
      httpApplicationRouting:
        enabled: true
        config:
          HTTPApplicationRoutingZoneName: "example.com"
    diskEncryptionSetID: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.Compute/diskEncryptionSets/my-encryption-set"
    apiServerAccessProfile:
      enablePrivateCluster: true
      authorizedIPRanges:
        - "192.168.0.0/24"
      disableRunCommand: false
      enablePrivateClusterPublicFQDN: true
      privateDNSZone: "example.private"
    publicNetworkAccess: Enabled
    networkProfile:
      networkPlugin: "Kubenet"
      networkPolicy: "Calico"
      loadBalancerSKU: "Standard"
    dnsPrefix: "my-aks-cluster"
    enableRBAC: true
    defaultAgentPool:
      osSKU: "Ubuntu"
      osType: "Linux"
      availabilityZones:
        - "1"
        - "2"
        - "3"
      vmSize: "Standard_D2s_v3"
      count: 3
      scaleSetPriority: "Regular"
      scaleSetEvictionPolicy: "Delete"
      vnetSubnetID: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.Network/virtualNetworks/my-vnet/subnets/my-subnet"
      spotMaxPrice: -1
      maxPods: 30
      enableNodePublicIP: false
      enableAutoScaling: true
      maxCount: 5
      minCount: 1
      nodeLabels:
        environment: "production"
        role: "default"
      nodeTaints:
        - "key=value:NoSchedule"
    servicePrincipalProfile:
      clientId: "00000000-0000-0000-0000-000000000000"
      secret: "sample-secret-value"
    aadProfile:
      managed: true
      enableAzureRBAC: true
      adminGroupObjectIDs:
        - "11111111-1111-1111-1111-111111111111"
      clientAppID: "22222222-2222-2222-2222-222222222222"
      serverAppID: "33333333-3333-3333-3333-333333333333"
      tenantID: "44444444-4444-4444-4444-444444444444"
      serverAppSecret: "sample-server-secret"
  agentPoolProfiles:
    - name: "userpool"
      mode: "User"
      osSKU: "Ubuntu"
      osType: "Linux"
      osDiskSizeGB: 128
      availabilityZones:
        - "1"
        - "2"
        - "3"
      vmSize: "Standard_D4s_v3"
      vnetSubnetID: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.Network/virtualNetworks/my-vnet/subnets/my-subnet"
      count: 2
      scaleSetPriority: "Regular"
      scaleSetEvictionPolicy: "Delete"
      spotMaxPrice: -1
      enableAutoScaling: true
      maxCount: 5
      minCount: 1
      maxPods: 50
      enableNodePublicIP: false
      nodeLabels:
        environment: "production"
        role: "worker"
      nodeTaints:
        - "workload=specialized:NoSchedule"
        - "priority=high:PreferNoSchedule"
      maxSurge: "25%"

Inputs


NameTypeDescription
provider*AzureProviderSpecProvider specifies the Azure provider settings for this AKS cluster.
name*stringName of the AKS cluster.
resourceGroupNamestringResource group name where the AKS cluster will be created.
tagsmap[string]stringTags to be applied to the AKS cluster.
skuManagedClusterSKUSKU configuration for the AKS cluster.
identityManagedClusterIdentityIdentity configuration for the AKS cluster.
propertiesManagedClusterPropertiesProperties configuration for the AKS cluster.
agentPoolProfiles[]AgentPoolProfileSpecAdditional agent pool configurations.

ManagedClusterSKU


NameTypeDescription
namestringSKU name (Basic or Standard).
tierstringSKU tier (Free or Paid).

ManagedClusterProperties


NameTypeDescription
kubernetesVersionstringVersion of Kubernetes to use.
dnsPrefixstringDNS prefix for the cluster.
enableRBACboolEnable Role Based Access Control.
networkProfileNetworkProfileNetwork configuration for the cluster.
defaultAgentPoolDefaultAgentPoolDefault node pool configuration.

LinuxProfile


NameTypeDescription
adminUsernamestringAdmin username for Linux nodes.
sshSSHConfigurationSSH configuration for Linux nodes.

SSHConfiguration


NameTypeDescription
publicKeys[]SSHPublicKeyList of SSH public keys.

SSHPublicKey


NameTypeDescription
keyDatastringSSH public key data.

WindowsProfile


NameTypeDescription
adminUsernamestringAdmin username for Windows nodes.
adminPasswordstringAdmin password for Windows nodes.
enableCSIProxyboolEnable Container Storage Interface proxy.
gmsaProfileGmsaProfileGroup Managed Service Account profile.
licenseTypestringWindows license type.

GmsaProfile


NameTypeDescription
enabledboolEnable GMSA.
dnsServerstringDNS server for GMSA.
rootDomainNamestringRoot domain name for GMSA.

NetworkProfile


NameTypeDescription
networkPluginstringNetwork plugin (Kubenet or Azure).
networkPolicystringNetwork policy (Calico, Azure, or None).
loadBalancerSKUstringLoad balancer SKU (Basic or Standard).

AgentPoolProfileSpec


NameTypeDescription
namestringName of the agent pool.
modestringMode of the agent pool (System or User).
osSKUstringOS SKU for the nodes.
osDiskSizeGBint32OS disk size in GB.
osTypestringOS type for the nodes.
availabilityZones[]stringList of availability zones.
vmSizestringVM size for the nodes.
countint32Number of nodes.
scaleSetPrioritystringPriority for scale set (Regular or Spot).
scaleSetEvictionPolicystringEviction policy (Delete or Deallocate).
enableAutoScalingboolEnable auto-scaling for the pool.
maxCountint32Maximum number of nodes.
minCountint32Minimum number of nodes.
maxPodsint32Maximum number of pods per node.
enableNodePublicIPboolEnable public IPs for nodes.
nodeLabelsmap[string]stringLabels to apply to nodes.
nodeTaints[]stringTaints to apply to nodes.
maxSurgestringMaximum surge for node upgrades.

AgentPoolStatus


NameTypeDescription
conditionmetav1.ConditionCurrent condition of the agent pool.
namestringName of the agent pool.
idstringID of the agent pool.

Outputs


NameTypeDescription
conditionmetav1.ConditionCurrent condition of the AKS cluster.
namestringName of the AKS cluster.
idstringAzure resource ID of the AKS cluster.
agentPoolStatusmap[string]AgentPoolStatusStatus of the agent pools in the cluster.

Status


AksStatus


NameTypeDescription
conditionmetav1.ConditionCurrent condition of the AKS cluster.
namestringName of the AKS cluster.
idstringID of the AKS cluster.
agentPoolStatusmap[string]AgentPoolStatusStatus of the agent pools in the cluster.

AgentPoolStatus


NameTypeDescription
conditionmetav1.ConditionCurrent condition of the agent pool.
namestringName of the agent pool.
idstringID of the agent pool.