1
0
IaC/terraform/vultr/cluster.tf

37 lines
831 B
Terraform
Raw Permalink Normal View History

2024-04-17 21:28:39 -04:00
resource "vultr_kubernetes" "k8s" {
region = "ewr"
version = "v1.29.2+1"
label = "cluster00"
ha_controlplanes = false
enable_firewall = false
node_pools {
node_quantity = 1
plan = "vc2-2c-2gb"
label = "cluster00-worker-2c-2g"
auto_scaler = false
}
}
resource "local_sensitive_file" "kubeconfig" {
content_base64 = vultr_kubernetes.k8s.kube_config
2024-04-19 01:31:44 -04:00
filename = pathexpand("~/.kube/vultr")
2024-04-17 21:28:39 -04:00
file_permission = "0600"
}
2024-04-19 01:31:44 -04:00
# resource "vultr_block_storage" "ssd0" {
# label = "cluster00-ssd0"
# size_gb = 10
# region = "ewr"
# block_type = "high_perf"
# attached_to_instance = vultr_kubernetes.k8s.node_pools[0].nodes[0].id
# live = true
# depends_on = [
# vultr_kubernetes.k8s
# ]
# }
2024-04-19 01:31:44 -04:00
# output "ssd0_mount" {
# value = vultr_block_storage.ssd0.mount_id
# }