Short, high-level tutorial for setting up a Kubernetes cluster locally, using Terraform and k3d, then deploying a simple hello-world application using kpt.


Create a k3d cluster with Terraform:

Clone the source repo and navigate to it, initialise terraform, then apply the configuration:

git clone ; cd terraform-k3dcp terraform.tfvars.example terraform.tfvarsterraform initterraform apply

Input “yes” when prompted, to accept the terraform apply

Take note of the outputs k3d_cluster_ip and k3d_host_lb_port, as these will be used to access the cluster later on.

Ben Fraser

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store