Skip to content

Instantly share code, notes, and snippets.

@rnemeth90
Last active June 11, 2022 16:09
Show Gist options
  • Save rnemeth90/80044f79ef31afded5c45a49ef8258fb to your computer and use it in GitHub Desktop.
Save rnemeth90/80044f79ef31afded5c45a49ef8258fb to your computer and use it in GitHub Desktop.
AKS Node Pool with Labels
resource "azurerm_kubernetes_cluster_node_pool" "np" {
name = var.node_pool_name
kubernetes_cluster_id = azurerm_kubernetes_cluster.k8s.id
vm_size = var.np_size
node_count = var.np_count
enable_auto_scaling = var.np-enable_auto_scaling
max_count = var.np-enable_auto_scaling_max_count
min_count = var.np-enable_auto_scaling_min_count
zones = (var.np-availability_zones == "") ? [] : split(",", var.np-availability_zones)
max_pods = var.np-max_pods
os_disk_size_gb = var.np-disk_size_gb
os_disk_type = var.np-os_disk_type
os_type = var.np-os_type
enable_node_public_ip = false
lifecycle {
ignore_changes = [
node_count,
max_count,
min_count
]
}
tags = var.np_tags
node_labels = {
os = "linux"
type = "system"
}
}
@rnemeth90
Copy link
Author

making public

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment