📝 Terraform module that generates a Kubeconfig for accessing GKE clusters
provider "google" {
...
}
module "kubeconfig" {
source = "github.com/joshdk/terraform-gke-kubeconfig//module"
auth_type = "gcloud"
gcloud_path = "/usr/bin/gcloud"
kubeconfig = "/tmp/config.yml"
name = "my-cluster"
zone = "us-east1-a"
}
The following input variables are required:
Description: The path of the Kubernetes client config file to create.
Type: string
Description: The name of the cluster.
Type: string
The following input variables are optional (have default values):
Description: The type of cluster auth to use. Must be one of (cert | gcloud | password).
Type: string
Default: "gcloud"
Description: The path of the gcloud executable.
Type: string
Default: "gcloud"
Description: The region this cluster has been created in.
Type: string
Default: ""
Description: The zone this cluster has been created in.
Type: string
Default: ""
The following outputs are exported:
Description: The name of the current Kube config context.
Description: The endpoint of the Kube API server.
Description: The path of the created Kubernetes client config.
Description: The name of the cluster.