Skip to content

Instantly share code, notes, and snippets.

@synhershko
Last active July 14, 2018 22:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save synhershko/f8c14a8031e3b756ccbf5041f6a7c253 to your computer and use it in GitHub Desktop.
Save synhershko/f8c14a8031e3b756ccbf5041f6a7c253 to your computer and use it in GitHub Desktop.
Install Terraform Kubernetes provider

This will install an updated Terraform Kubernetes provider plugin in your Terraform working directory:

curl https://gist.githubusercontent.com/synhershko/f8c14a8031e3b756ccbf5041f6a7c253/raw/38be5292603595c541f6ad3df811e6c0be92b8df/kube-provider.sh | bash -s

As opposed to the provider maintained by HashiCorp, the provider plugin referenced here is up to date and has support for the latest Kubernetes APIs (like Deployments, Jobs, etc). Hence this script.

export VERSION=1.1.1
rm .terraform/plugins/linux_amd64/terraform-provider-kubernetes*
wget https://github.com/sl1pm4t/terraform-provider-kubernetes/releases/download/v${VERSION}-custom/terraform-provider-kubernetes_v${VERSION}-custom_linux_amd64.zip
unzip terraform-provider-kubernetes_v${VERSION}-custom_linux_amd64.zip
mv terraform-provider-kubernetes_v${VERSION}-custom_x4 .terraform/plugins/linux_amd64/
rm terraform-provider-kubernetes*
terraform init
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment