[英]Connect to GKE cluster dynamically using terraform
我正在使用 Terraform 脚本启动 GKE 集群,然后使用 helm 3 在集群上安装 splunk 连接器。
如何动态连接到 terraform kube.netes 提供程序中新创建的集群?
让提供者依赖集群证书:
data "google_client_config" "terraform_config" {
provider = google
}
provider "kubernetes" {
load_config_file = false
host = "https://${google_container_cluster.my_cluster.endpoint}"
cluster_ca_certificate = base64decode(google_container_cluster.my_cluster.master_auth[0].cluster_ca_certificate)
token = data.google_client_config.terraform_config.access_token
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.