簡體   English   中英

使用 terraform 動態連接到 GKE 集群

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM