This is a project that utilizes Terraform and Ansible to automate a customized deployment of a k8s-cluster on a Proxmox host
# Clone the repository
git clone https://github.com/mathiasunneland/k8s-launcher.git
cd k8s-launcherTo use this project you need these prerequisites installed locally:
And a running Proxmox host on the same network:
The code needs these changes for the project to work:
- Assign terraform values to
terraformExample.tfvarsand rename toterraform.tfvars - Assign ansible values to
secretsExample.yamland rename tosecrets.yaml
The Proxmox host needs these changes for the project to work:
- Your public key needs to be added to authorized_keys
# Run this on the Proxmox host shell
nano ~/.ssh/authorized_keys# Add your own public key
ssh-ed25519 ABCDEFGHIJKLMNOPQRSTUVWXYZ [email protected]- The local storage on Proxmox needs to support snippets
# Run this on the Proxmox host shell
nano /etc/pve/storage.cfg # Add "snippets" on content line of local storage
dir: local
path /var/lib/vz
content iso,vztmpl,backup,snippetsWhen everything is setup for deployment:
# Run the deployment python script
python3 deploy.py