video-iac/terraform/lke.tf

76 lines
1.3 KiB
HCL

resource "linode_lke_cluster" "stg-video-cluster" {
label = "stg-video-cluster"
k8s_version = "1.21"
region = "us-central"
tags = ["staging"]
pool {
type = "g6-standard-2"
count = 1
}
# WebRTC-BE pool
pool {
type = "g6-standard-2"
count = 1
}
# Coturn pool
pool {
type = "g6-standard-2"
count = 1
}
}
provider "kubernetes" {
config_path = "../k8s/stg-video-cluster-kubeconfig.yaml"
alias = "cluster-staging"
}
resource "kubernetes_namespace" "external-dns" {
metadata {
name = "external-dns"
}
provider = kubernetes.cluster-staging
}
resource "kubernetes_secret" "aws_user_external_dns" {
metadata {
name = "aws-user-external-dns"
namespace = "external-dns"
}
data = {
username = aws_iam_access_key.lke-external-dns.id
password = aws_iam_access_key.lke-external-dns.secret
}
type = "kubernetes.io/basic-auth"
provider = kubernetes.cluster-staging
}
resource "linode_lke_cluster" "prd-video-cluster" {
label = "prd-video-cluster"
k8s_version = "1.21"
region = "us-central"
tags = ["production"]
pool {
type = "g6-standard-2"
count = 3
}
# WebRTC-BE pool
pool {
type = "g6-standard-2"
count = 3
}
# Coturn pool
pool {
type = "g6-standard-2"
count = 3
}
}