Repo contains IaC code to bootstrap kubernetes node machines.
Built for Proxmox 8.1.3.
- Copy
.env.exampleto.envand adjust. source .env- Create
secret.tfvars:
pve_password = ""- Initialize:
terraform init #-backend-config=backend.conf- (Optional) Prepare a few env vars:
export TF_LOG="" # Set to DEBUG if need be
export VAULT_ADDR="http://10.0.1.152:8200"
export VAULT_TOKEN="..."- Execute:
make plan
make apply # Caution: auto-approve
make extract-configs# Get talos config
terraform output -json | jq .kubernetes.value.talos_machine_config -r > $HOME/.talos/config
# Get talos kubeconfig
terraform output -json | jq .kubernetes.value.talos_kubeconfig -r > $HOME/.kube/config
# Get talos nodes (e.g. for talosctl health --endpoints ...)
terraform output -json | jq .kubernetes.value.talos_nodes -r
# Get talos image data (debugging)
terraform output -json | jq .kubernetes.value.talos_image_data
terraform output -json | jq .kubernetes.value.talos_image_data.talos_image_factory_schematic.schematic -r