Files
terraform-talos/hetzner
FloMaetschke 8724b30aae Update variables.tf (#2)
fixed typo: hezner --> hetzner
2021-12-17 21:22:18 +02:00
..
2021-11-21 08:58:17 +02:00
2021-12-07 20:34:47 +02:00
2021-09-19 16:27:44 +03:00
2021-11-21 08:58:17 +02:00
2021-05-29 11:26:02 +03:00
2021-09-18 22:08:33 +03:00
2021-12-07 20:34:47 +02:00
2021-12-07 20:34:47 +02:00
2021-08-17 18:28:46 +03:00
2021-12-07 20:34:47 +02:00
2021-09-18 22:08:33 +03:00
2021-12-07 20:34:47 +02:00
2021-05-29 11:26:02 +03:00
2021-09-03 10:33:26 +03:00
2021-08-22 17:43:37 +03:00
2021-12-17 21:22:18 +02:00
2021-09-19 19:13:15 +03:00

Terraform examples

Local utilities

  • terraform
  • talosctl
  • kubectl
  • yq

Talos on Hetzner Cloud

This terraform example install Talos on HCloud with IPv4/IPv6 support.

Kubernetes addons

Prepare the base image

First, prepare variables to your environment

export TF_VAR_hcloud_token=KEY

Terraform will run the VM in recovery mode, replace the base image and take a snapshote. Do not run terraform destroy after. It will delete the snapshot.

make prepare-image

Install control plane

Generate the default talos config

make create-config create-templates

open config file terraform.tfvars and add params

# counts and type of kubernetes master nodes
controlplane = {
    count = 1,
    type  = "cpx11"
}

# regions to use
regions = ["nbg1", "fsn1", "hel1"]

# counts and type of worker nodes by redion
instances = {
    "nbg1" = {
      web_count            = 1,
      web_instance_type    = "cx11",
      worker_count         = 1,
      worker_instance_type = "cx11",
    },
    "fsn1" = {
      web_count            = 1,
      web_instance_type    = "cx11",
      worker_count         = 1,
      worker_instance_type = "cx11",
    }
    "hel1" = {
      web_count            = 1,
      web_instance_type    = "cx11",
      worker_count         = 1,
      worker_instance_type = "cx11",
    }
}

And deploy the kubernetes master nodes

make create-controlplane

Then deploy all other instances

make create-infrastructure