2021-06-06 15:17:27 +03:00
2021-06-06 15:17:27 +03:00
2021-06-05 22:50:20 +03:00
2021-06-04 00:09:55 +03:00
2021-05-29 11:05:15 +03:00
2021-06-05 22:50:20 +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
Description
No description provided
Readme MIT 1 MiB
Languages
HCL 80.2%
Smarty 11.3%
Makefile 8.5%