【发布时间】:2022-01-24 14:52:29
【问题描述】:
如果我们在节点池中增加工作节点,Terraform 计划总是强制重新创建 AKS 集群
尝试通过 Terraform 创建具有 1 个工作节点的 AKS 集群,进展顺利,集群已启动并正在运行。
发布后,我尝试在我的 AKS 中再添加一个工作节点,Terraform Show Plan:2 添加,0 更改,2 销毁。
不确定我们如何在 aks 节点池中增加工作节点,如果它延迟了现有的节点池。
default_node_pool {
name = var.nodepool_name
vm_size = var.instance_type
orchestrator_version = data.azurerm_kubernetes_service_versions.current.latest_version
availability_zones = var.zones
enable_auto_scaling = var.node_autoscalling
node_count = var.instance_count
enable_node_public_ip = var.publicip
vnet_subnet_id = data.azurerm_subnet.subnet.id
node_labels = {
"node_pool_type" = var.tags[0].node_pool_type
"environment" = var.tags[0].environment
"nodepool_os" = var.tags[0].nodepool_os
"application" = var.tags[0].application
"manged_by" = var.tags[0].manged_by
}
}
错误
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement
Terraform will perform the following actions:
# azurerm_kubernetes_cluster.aks_cluster must be replaced
-/+ resource "azurerm_kubernetes_cluster" "aks_cluster" {
谢谢 萨蒂扬
【问题讨论】:
标签: kubernetes terraform azure-aks terraform-provider-azure