forked from krishanshamod/k8s-cluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
aks-cluster.tf
37 lines (32 loc) · 1.04 KB
/
aks-cluster.tf
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
resource "azurerm_kubernetes_cluster" "default" {
name = "aks-cluster"
location = azurerm_resource_group.default.location
resource_group_name = azurerm_resource_group.default.name
dns_prefix = "aks-cluster"
default_node_pool {
name = "default"
node_count = 3
vm_size = "Standard_D2_v2"
os_disk_size_gb = 30
}
service_principal {
client_id = var.aks_service_principal_client_id
client_secret = var.aks_service_principal_client_secret
}
tags = {
environment = "Production"
}
}
# resource "local_file" "kubeconfig" {
# filename = "./.kube/config"
# content = azurerm_kubernetes_cluster.default.kube_config_raw
# depends_on = [azurerm_kubernetes_cluster.default]
# }
# resource "helm_release" "traefik" {
# namespace = "traefik-v2"
# create_namespace = true
# name = "traefik"
# repository = "https://helm.traefik.io/traefik"
# chart = "traefik"
# depends_on = [local_file.kubeconfig]
# }