Co-authored-by: Marcel Straub <m@straubs.eu> Reviewed-on: s5b-private/k8s#1
2.5 KiB
2.5 KiB
Infrastructure
Here, you find everything to setup the VM infrastructure for TALOS cluster.
Structure
Get started
Setup Proxmox Cluster
tbd. For now, it's expected to have happened already.
- Creation of terraform user
- Assign role
- create token
Install OpenTofu
Important
: Ensure that the amd64 version of OpenTofu is installed. The i386 32bit plugins are providing a lot of trouble, i.e. failing provisionings, unparsable data structures, etc.pp.
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://get.opentofu.org/opentofu.gpg | sudo tee /etc/apt/keyrings/opentofu.gpg >/dev/null
curl -fsSL https://packages.opentofu.org/opentofu/tofu/gpgkey | sudo gpg --no-tty --batch --dearmor -o /etc/apt/keyrings/opentofu-repo.gpg >/dev/null
sudo chmod a+r /etc/apt/keyrings/opentofu.gpg
echo \
"deb [signed-by=/etc/apt/keyrings/opentofu.gpg,/etc/apt/keyrings/opentofu-repo.gpg] https://packages.opentofu.org/opentofu/tofu/any/ any main
deb-src [signed-by=/etc/apt/keyrings/opentofu.gpg,/etc/apt/keyrings/opentofu-repo.gpg] https://packages.opentofu.org/opentofu/tofu/any/ any main" | \
sudo tee /etc/apt/sources.list.d/opentofu.list > /dev/null
sudo apt install tofu
Important tasks
Reuse machine secrets
tofu state rm module.talos.talos_machine_secrets.this
tofu import module.talos.talos_machine_secrets.this output/talos-machine-secrets.yaml
tofu apply --refresh=false
Run interactive container
kubectl run -i --tty --rm debug --image=harbor.prod.eis-mk8.de.s5b.org/internal/debug-container:latest --restart=Never -- /usr/bin/zsh
If the container is not automatically removed, use
kubectl delete pod debug