Alicloud ACK node pool has no automatic repair

Enable required automatic repair for managed node pools.

Description

To let ACK repair supported node faults, set both enable and auto_repair to true in the managed node pool’s management block.

Potential impact

Without auto repair or an alternative response, a failed node can remain unavailable and interrupt workloads.

Remediation

Check that ack-node-problem-detector is running and review node repair events. Allow enough spare capacity for workloads to run while a node restarts and check how many nodes can be unavailable at once.

Examples

Both examples request one node. The second also enables automatic upgrades and sets max_unavailable = 1, so the only node may be unavailable. Supply the omitted node authentication and disk settings.

Before

hcl
resource "alicloud_cs_kubernetes_node_pool" "default" {
  name           = var.name
  cluster_id     = alicloud_cs_managed_kubernetes.default.0.id
  vswitch_ids    = [alicloud_vswitch.default.id]
  instance_types = [data.alicloud_instance_types.default.instance_types.0.id]

  desired_size = 1
}

After

hcl
resource "alicloud_cs_kubernetes_node_pool" "default" {
  name           = var.name
  cluster_id     = alicloud_cs_managed_kubernetes.default.0.id
  vswitch_ids    = [alicloud_vswitch.default.id]
  instance_types = [data.alicloud_instance_types.default.instance_types.0.id]

  desired_size = 1

  management {
    enable          = true
    auto_repair     = true
    auto_upgrade    = true
    surge           = 1
    max_unavailable = 1
  }
}

References