Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
enable_gpu_nodepool
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieu-benoit committed Sep 20, 2023
1 parent d251f46 commit c2128ee
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions resources/terraform/azure-aks-new/aks-gpu.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/kubernetes_cluster_node_pool
resource "azurerm_kubernetes_cluster_node_pool" "gpu" {
count = var.enable_gpu_nodepool ? 1 : 0
name = "gpu"
kubernetes_cluster_id = azurerm_kubernetes_cluster.aks.id
vm_size = "Standard_NC4as_T4_v3"
node_count = 1

node_taints = [
"sku=gpu:NoSchedule",
]
}
6 changes: 6 additions & 0 deletions resources/terraform/azure-aks-new/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,10 @@ variable "node_size" {
variable "existing_acr_name" {
description = "Name of the existing ACR to attach to AKS"
type = string
}

variable "enable_gpu_nodepool" {
description = "Create a nodepool dedicated to GPU."
type = bool
default = false
}

0 comments on commit c2128ee

Please sign in to comment.