-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgpu.tf
More file actions
42 lines (37 loc) · 1.03 KB
/
Copy pathgpu.tf
File metadata and controls
42 lines (37 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# NVIDIA Device Plugin and GPU Storage
#
# EKS (unlike GKE) does not auto-install the NVIDIA device plugin.
# Without it, GPU nodes don't advertise nvidia.com/gpu resources
# and GPU pods stay Pending.
resource "helm_release" "nvidia_device_plugin" {
name = "nvidia-device-plugin"
repository = "https://nvidia.github.io/k8s-device-plugin"
chart = "nvidia-device-plugin"
version = "0.17.1"
namespace = "kube-system"
values = [
yamlencode({
tolerations = [
{
key = "nvidia.com/gpu"
operator = "Exists"
effect = "NoSchedule"
}
]
})
]
depends_on = [module.eks]
}
# Default StorageClass — EKS gp2 is not marked default, causing PVCs
# without explicit storageClassName to stay Pending.
resource "kubernetes_annotations" "gp2_default" {
api_version = "storage.k8s.io/v1"
kind = "StorageClass"
metadata {
name = "gp2"
}
annotations = {
"storageclass.kubernetes.io/is-default-class" = "true"
}
depends_on = [module.eks]
}