Skip to content
No description, website, or topics provided.
HCL
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
terraform.example.tfvars
terraform.tf

README.md

Example of Terraform, Digital Ocean, Kubernetes

Ondrej Sika <ondrej@ondrejsika.com>
https://github.com/ondrejsika/terraform-do-kubernetes-example

Tutorial

Install Terraform & kubectl first

brew install kubernetes-cli
brew install terraform

Clone repository

git clone git@github.com:ondrejsika/terraform-do-kubernetes-example.git

Initialize Terraform

terraform init

See infrastructure changes

terraform plan

Apply infrastructure changes

terraform apply -auto-approve

Get your Kubernetes config

terraform output kubeconfig > kubeconfig

Test connection to cluster

export KUBECONFIG=kubeconfig
kubectl cluster-info
kubectl get nodes

Destroy your infrastructure

terraform destroy -auto-approve
You can’t perform that action at this time.