No description
Find a file
2024-11-24 17:53:56 +01:00
packer removed obsolete packer template 2024-11-24 15:04:14 +01:00
.gitignore ignore talosctl+kubectl config 2024-11-20 19:17:38 +01:00
cilium.tf cilium version can be set, default versions for talos, k8s, cilium 2024-11-24 17:53:56 +01:00
hcloud.tf automatic image generation with local-exec 2024-11-24 12:07:46 +01:00
hcloud_firewall.tf tf code 2024-11-19 22:23:38 +01:00
locals.tf tf code 2024-11-19 22:23:38 +01:00
outputs.tf fixed deprecated data for kubeconfig to resource 2024-11-22 14:22:12 +01:00
packer.tf automatic image generation with local-exec 2024-11-24 12:07:46 +01:00
providers.tf providers setup 2024-11-19 21:45:00 +01:00
README.md update README 2024-11-24 12:27:56 +01:00
renovate.json Add renovate.json 2024-11-19 20:45:22 +00:00
talos.tf specifiying kubernetes version is actually easy m) 2024-11-24 16:39:42 +01:00
test.tfvars.sample config scheduling on cp, config kubernetes version 2024-11-22 10:34:56 +01:00
variables.tf cilium version can be set, default versions for talos, k8s, cilium 2024-11-24 17:53:56 +01:00

Setup talos cluster

This will not be perfect, it's for my own use and for learning :)

Target

  • running talos with defined number of controlplanes/workers
  • install Hetzner Cloud Controller Manager
  • install Cilium with Gateway API

Configured correctly and Hetzner has no issues, talos + kubernetes is up and runing in about 5 minutes.

Requirements

  • Hetzner customer :)
  • Domain at Hetzner, not needed, can be removed/adapted
  • packer for creating a talos base image
  • tofu (Should work with terraform too)
  • I use direnv to setup all the needed configuration variables

Config

Required environment variables:

# to use hcloud command in shell, optional
export HCLOUD_TOKEN=....
# for provider setup
export TF_VAR_hcloud_token=$HCLOUD_TOKEN

# provider setup
export HETZNER_DNS_API_TOKEN=...

# not needed, but useful when used with direnv in .envrc file
# tofu output -raw kubeconfig >kubeconfig; tofu output -raw talosconfig >talosconfig
export KUBECONFIG=kubeconfig
export TALOSCONFIG=talosconfig

Input Parameter

see test.tfvars.sample

Create cluster

cd <repodir>
cp test.tfvars.sample test.tfvars
# adapt parameters

# initialize tofu/packer
tofu init
packer init --upgrade packer/talos_image.pkr.hcl

tofu apply -var-file=test.tfvars

Todo

  • define cilium version to be installed (hardcoded to 1.16rc right now)
  • maybe some other tweaks
  • maybe instsall flux, not sure if that should be part of initial setup