Files
homelab-v/tofu/kubernetes
renovate[bot]Vegard Hagenrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
7e388f55d7 chore(renovate): renovate 2025-07-18
chore(deps): update helm release cert-manager to v1.18.2 (#293)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

chore(deps): update proxmox-csi-plugin docker tag to v0.3.11 (#311)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

chore(deps): update cloudflare/cloudflared docker tag to v2025.7.0 (#314)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

chore(deps): update dependency siderolabs/talos to v1.10.5 (#331)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

chore(deps): update media containers (#328)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

chore(deps): update ghcr.io/prometheus-community/charts/kube-prometheus-stack docker tag to v73.2.3 (#332)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

chore(deps): update cilium (#333)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

chore(deps): update actions/checkout action to v4.2.2 (#336)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

chore(deps): update docker.io/adguard/adguardhome docker tag to v0.107.63 (#338)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

chore(deps): update dependency kubernetes/kubernetes to v1.33.3 (#335)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

chore(deps): update ghcr.io/authelia/authelia docker tag to v4.39.5 (#339)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

chore(deps): update ghcr.io/home-operations/qbittorrent docker tag to v5.1.2 (#340)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

chore(deps): update helm release authelia to v0.10.39 (#341)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

chore(deps): update registry.k8s.io/git-sync/git-sync docker tag to v4.4.2 (#342)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

chore(deps): update sealed-secrets docker tag to v2.5.16 (#343)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

chore(deps): update ghcr.io/advplyr/audiobookshelf docker tag to v2.26.1 (#344)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

chore(deps): update netbird (#345)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

chore(deps): update terraform proxmox to v0.80.0 (#346)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

chore(deps): update ghcr.io/home-operations/prowlarr docker tag to v2 (#347)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

chore(deps): update ghcr.io/prometheus-community/charts/kube-prometheus-stack docker tag to v75 (#348)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Vegard Hagen <[email protected]>

chore(deps): update helm release authelia to v0.10.41 (#349)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-19 18:51:55 +02:00
..
2025-04-18 13:56:14 +02:00

Kubernetes Tofu

Read Talos Kubernetes on Proxmox using OpenTofu for a more thorough explanation of how everything works.

Install pre-requisites

  1. tofu
  2. talosctl
  3. kubectl

Initialize tofu

tofu init

Proxmox

Environment variable

export TF_VAR_proxmox_api_token="<YOUR_API_TOKEN>"

Optional External Secrets Manager / Other methods

Bitwarden Secrets Manager - Name your secret TF_VAR_proxmox_api_token in bws.

bws run -- tofu ...

Note: By default, the shell is sh. Change with --shell if required.

Sealed-secrets

Generate certificate

openssl req -x509 -days 365 -nodes -newkey rsa:4096 -keyout sealed-secrets.key -out sealed-secrets.crt -subj "/CN=sealed-secret/O=sealed-secret"

Kubernetes

Output kubeconfig

tofu output -raw kube_config

Talos

Output talosconfig

tofu output -raw talos_config

Upgrading Talos and Kubernetes

Upgrade talos nodes one by one.

  1. Set talos_image.auto.tfvars -> image -> update_version to the required update version.
  2. Set talos_cluster.auto.tfvars -> talos_cluster_config -> kubernetes_version to the required kubernetes version.
  3. Set talos_nodes.auto.tfvars -> talos_nodes -> $node_1 -> update = true and run tofu apply.
  4. Set talos_nodes.auto.tfvars -> talos_nodes -> $node_2 -> update = true, leave the previous nodes update = true and run tofu apply.
  5. Set talos_nodes.auto.tfvars -> talos_nodes -> $node_3 -> update = true, leave the previous nodes update = true and run tofu apply.
  6. ...
  7. Set talos_nodes.auto.tfvars -> talos_nodes -> $node_n -> update = true, leave the previous nodes update = true and run tofu apply.
  8. After upgrading all nodes, Set talos_image.auto.tfvars -> image -> version to match the update version and set update = false for all nodes.

Upgrading Talos Schematic

  1. Create a new schematic file.
  2. Same process as above instead of image.version and image.update_version, change image.schematic and image.update_schematic, in talos_image.auto.tfvars.

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