
This is a terraform config demonstrating spinning up 14 clusters in only a /26 (64 addresses) to demonstrate the GKE clusters do not need to consume large amounts of RFC1918 IP addresses.
28 lines
506 B
HCL
28 lines
506 B
HCL
terraform {
|
|
required_providers {
|
|
kubernetes = {
|
|
source = "hashicorp/kubernetes"
|
|
version = ">= 2.36.0"
|
|
}
|
|
}
|
|
}
|
|
|
|
data "google_client_config" "default" {}
|
|
|
|
resource "kubernetes_cluster_role_binding" "cluster_admin_binding" {
|
|
metadata {
|
|
name = "cluster-admin-binding"
|
|
}
|
|
|
|
subject {
|
|
kind = "User"
|
|
name = data.google_client_config.default.id
|
|
}
|
|
|
|
role_ref {
|
|
api_group = "rbac.authorization.k8s.io"
|
|
kind = "ClusterRole"
|
|
name = "cluster-admin"
|
|
}
|
|
}
|