a Flux + Terraform infrastructure repo
- [x] add Flux for cluster repo
- [x] get talosconfig
- [ ] access Kubernetes APIServer
- [ ] verify Ceph disk allocation
Install OpenTofu
brew install opentofu
You’ll need .tfvar files, currently we create those via org files.
cd ~/infra
mkdir -p ./tmp/
touch ./tmp/cluster-kubeconfig
tofu init -var-file=./config.tfvars -var-file=./secrets.tfvars -var github_token="$(gh auth token)" --upgrade
plan
tofu plan -var-file=./config.tfvars -var-file=./secrets.tfvars -var github_token="$(gh auth token)"
apply
tofu apply -var-file=./config.tfvars -var-file=./secrets.tfvars -var github_token="$(gh auth token)"
get talosconfig
mkdir -p ~/.talos
tofu output -raw talosconfig > ~/.talos/config
get kubeconfig
mkdir -p ~/.kube
tofu output -raw kubeconfig > ~/.kube/config
force a reconciliation
CLUSTER_NAME=cloudnative-coop
flux --kubeconfig ~/.kube/config-"$CLUSTER_NAME" reconcile source git flux-system
tofu state list | grep -E 'talos|flux|manifests|kubernetes_manifest' | xargs -I{} tofu state rm {}
tofu destroy -var-file=./config.tfvars -var-file=./secrets.tfvars -var github_token="$(gh auth token)"
- Equinix Metal Cloud Provider 401 error regarding IP allocation and assigning