vimwtf/vsphere-k8s
Automating the deployment of vanilla Kubernetes clusters on vSphere with Packer and Terraform
README
Vanilla Kubernetes on VMware vSphere
- Packer installed on your system
- Account in vSphere with appropriate privileges
- Ubuntu Server 20.04 installation ISO copied to a vSphere datastore
cd packer.
- Copy
ubuntu-k8s.example.pkrvars.hcl to ubuntu-k8s.auto.pkrvars.hcl and update it as appropriate for your environment.
- Put the SSH private key which corresponds to the
build_key variable in packer_cache/ssh_private_key_packer.pem.
- Place any needed internal CA PEM-formatted certs (with
.cer file extension) in certs/.
- Run it with
packer build -on-error=abort -force ..
cd terraform.
- Copy
terraform.example.tfvars to terraform.auto.tfvars and update it as appropriate for your environment.
- Initialize Terraform:
terraform init.
- Create the deployment with
terraform apply.