<p>I am testing out some Terraform code to create a Kubernetes cluster so I chose the smallest/cheapest VM</p>

<pre><code>resource "azurerm_kubernetes_cluster" "k8s" {
    name                = "${var.cluster_name}"
    location            = "${azurerm_resource_group.resource_group.location}"
    resource_group_name = "${azurerm_resource_group.resource_group.name}"
    dns_prefix          = "${var.dns_prefix}"

    agent_pool_profile {
        name            = "agentpool"
        count           = "${var.agent_count}"
        vm_size         = "Standard_B1s"
        os_type         = "Linux"
        os_disk_size_gb = "${var.agent_disk_size}"
    }

    service_principal {
        client_id     = "${var.client_id}"
        client_secret = "${var.client_secret}"
    }
}
</code></pre>

<p>However, when I <code>terraform apply</code> I get this error message back from azure:</p>

<blockquote>
  <p>"The VM SKU chosen for this cluster <code>Standard_B1s</code> does not have enough CPU/memory to run as an AKS node."</p>
</blockquote>

<p>How do I list the valid VM SKUs for AKS nodes and sort them by cost?</p>

opticyclic
<p>You need to select an instance with <strong>at least 3.5 GB of memory</strong>. Read <em>A note on node size</em> from this <a href="https://stackify.com/azure-container-service-kubernetes/" rel="noreferrer">blog</a>. You can list the VM size and price on the <a href="https://azure.microsoft.com/en-ca/pricing/details/virtual-machines/linux/" rel="noreferrer">Azure sales site</a>.</p>

<p>Currently, the cheapest is <code>Standard_B2s</code> with 4 GB RAM. You can also sort it directly in the Azure portal.
<a href="https://i.stack.imgur.com/p3uFf.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/p3uFf.jpg" alt="enter image description here"></a></p>
