Terraform definition for provisioning VMs in Azure or locally via Vagrant to create a Kubernetes cluster with Windows support via Rancher for testing purposes.
You can find a detailed explanation in the blog post.
You need to install Terraform before deploying on Azure or locally via Vagrant.
Install the Azure CLI and execute the following in the directory of the cloned repository:
az login # log in to your Azure account
terraform init # initialize terraform
terraform apply -auto-approve # provision infrastructure
Install Vagrant as well as Hyper-V and use the following commands instead:
terraform init # initialize terraform
terraform apply -auto-approve -var 'vagrant_enable=true' -var 'vagrant_vswitch=myswitch' # provision infrastructure
The parameter vagrant_vswitch
must be set to the name of a virtual switch with external connectivity. It can be found via the Manager for virtual switches inside the Hyper-V Manager.