📝 Terraform module that generates a Kubeconfig for accessing GKE clusters
When provisioning GKE clusters, there is no direct (API) way to obtain a kubeconfig, and the only way to do so requires a hard external dependency on the gcloud cli, and by extension, a working python installation.
Additionally, gcloud
provides no means of obtaining a kubeconfig that uses
certificate
or password
authentication.
This module streamlines this process by generating a kubeconfig file similar to
how gcloud
would, without needing it as a dependency. This config can then be
passed to other units (kubectl
, helm
, etc) for usage.
To use this module, a pre-built release version can be sourced.
module "kubeconfig" {
source = "https://github.com/joshdk/terraform-gke-kubeconfig/releases/download/0.1.0/module.tgz"
...
}
Alternatively, a development version can be sourced instead.
module "kubeconfig" {
source = "github.com/joshdk/terraform-gke-kubeconfig//module"
...
}
To configure inputs for the module, refer to the bundled readme.
This code is distributed under the MIT License, see LICENSE.txt for more information.