Windows ノードプールは自動スケールアウトを有効にしてみた。
resource "azurerm_resource_group" "example" { name = "rg-example-dev" location = "japaneast" } resource "azurerm_kubernetes_cluster" "example" { name = "aks-example-dev" resource_group_name = azurerm_resource_group.example.name location = azurerm_resource_group.example.location sku_tier = "Free" dns_prefix = "aksexampledev" default_node_pool { name = "default" node_count = 1 vm_size = "Standard_D2_v2" } identity { type = "SystemAssigned" } # Windows ノードを使う場合は windows_profile の記述が必須 windows_profile { admin_username = "yourusername" admin_password = "YourP@ssw0rd!!" license = "Windows_Server" } # Windows ノードを使う場合は network_plugin = "azure" の指定が必要 network_profile { network_plugin = "azure" } } # Windows 2019 ノードプール resource "azurerm_kubernetes_cluster_node_pool" "windows" { name = "npwin" kubernetes_cluster_id = azurerm_kubernetes_cluster.example.id vm_size = "Standard_D2s_v3" os_type = "Windows" os_sku = "Windows2019" node_count = 2 enable_auto_scaling = true max_count = 100 min_count = 2 }