1
votes

There seems to be a az cli version to create a autoscaling kubernetes cluster in Azure AKS. https://docs.microsoft.com/en-us/azure/aks/cluster-autoscaler

Can this be done via Azure ARM templates too? If yes, can you please point me to some examples?

1

1 Answers

0
votes

its not documented anywhere, as far as I can tell, reference here. working example:

{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "resources": [
        {
            "location": "eastus",
            "name": "name",
            "type": "Microsoft.ContainerService/ManagedClusters",
            "apiVersion": "2019-04-01",
            "properties": {
                "kubernetesVersion": "1.13.5",
                "dnsPrefix": "xxx",
                "agentPoolProfiles": [
                    {
                        "name": "nodepool1",
                        "count": 1,
                        "vmSize": "Standard_DS2_v2",
                        "osDiskSizeGB": 100,
                        "storageProfile": "ManagedDisks",
                        "maxPods": 110,
                        "osType": "Linux",
                        "enable_auto_scaling": true,
                        "min_count": 1,
                        "max_count": 3,
                        "type": "VirtualMachineScaleSets"
                    }
                ],
                "linuxProfile": {
                    "adminUsername": "azureuser",
                    "ssh": {
                        "publicKeys": [
                            {
                                "keyData": "xxx"
                            }
                        ]
                    }
                },
                "servicePrincipalProfile": {
                    "clientId": "yyy",
                    "secret": "xxx"
                },
                "enableRBAC": true,
                "networkProfile": {
                    "networkPlugin": "kubenet",
                    "podCidr": "10.244.0.0/16",
                    "serviceCidr": "10.0.0.0/16",
                    "dnsServiceIP": "10.0.0.10",
                    "dockerBridgeCidr": "172.17.0.1/16"
                }
            }
        }
    ]
}

ps. its probably not supported.