joshdk / terraform-gke-kubeconfig

πŸ“ Terraform module that generates a Kubeconfig for accessing GKE clusters

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CircleCI License GitHub release

Terraform GKE Kubeconfig

πŸ“ Terraform module that generates a Kubeconfig for accessing GKE clusters

Motivations

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.

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.

License

This code is distributed under the MIT License, see LICENSE.txt for more information.

About

πŸ“ Terraform module that generates a Kubeconfig for accessing GKE clusters

License:MIT License


Languages

Language:HCL 75.0%Language:Smarty 15.2%Language:Makefile 9.8%