Fixed dns issue, updated Talos

This commit is contained in:
Max Pfeiffer
2026-01-03 17:48:11 +01:00
parent e533438a5b
commit c9fc58993c
5 changed files with 29 additions and 17 deletions

View File

@@ -8,11 +8,11 @@ proxmox_storage_device = "samsung-ssd"
# Talos Linux # Talos Linux
# Talos version needs to correspond to the install_image version in node_data # Talos version needs to correspond to the install_image version in node_data
# See: https://github.com/siderolabs/terraform-provider-talos/blob/main/docs/data-sources/machine_configuration.md # See: https://github.com/siderolabs/terraform-provider-talos/blob/main/docs/data-sources/machine_configuration.md
talos_version = "1.11.4" talos_version = "1.11.6"
kubernetes_version = "1.34.1" kubernetes_version = "1.34.2"
# With these variables you can configure the ISO images which are uploaded to Proxmox for initially booting the VMs # With these variables you can configure the ISO images which are uploaded to Proxmox for initially booting the VMs
talos_linux_iso_image_url = "https://factory.talos.dev/image/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515/v1.11.4/nocloud-amd64.iso" talos_linux_iso_image_url = "https://factory.talos.dev/image/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515/v1.11.6/nocloud-amd64.iso"
talos_linux_iso_image_filename = "talos-linux-v1.11.4-qemu-guest-agent-amd64.iso" talos_linux_iso_image_filename = "talos-linux-v1.11.6-qemu-guest-agent-amd64.iso"
# Name of the cluster # Name of the cluster
cluster_name = "your cluster name" cluster_name = "your cluster name"
# VIP address for the control planes, see https://www.talos.dev/v1.11/talos-guides/network/vip/ # VIP address for the control planes, see https://www.talos.dev/v1.11/talos-guides/network/vip/
@@ -22,33 +22,33 @@ node_data = {
controlplanes = { controlplanes = {
"192.168.10.101" = { "192.168.10.101" = {
install_disk = "/dev/vda" install_disk = "/dev/vda"
install_image = "factory.talos.dev/nocloud-installer/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515:v1.11.4" install_image = "factory.talos.dev/nocloud-installer/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515:v1.11.6"
}, },
"192.168.10.102" = { "192.168.10.102" = {
install_disk = "/dev/vda" install_disk = "/dev/vda"
install_image = "factory.talos.dev/nocloud-installer/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515:v1.11.4" install_image = "factory.talos.dev/nocloud-installer/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515:v1.11.6"
}, },
"192.168.10.103" = { "192.168.10.103" = {
install_disk = "/dev/vda" install_disk = "/dev/vda"
install_image = "factory.talos.dev/nocloud-installer/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515:v1.11.4" install_image = "factory.talos.dev/nocloud-installer/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515:v1.11.6"
}, },
} }
workers = { workers = {
"192.168.10.104" = { "192.168.10.104" = {
install_disk = "/dev/vda" install_disk = "/dev/vda"
install_image = "factory.talos.dev/nocloud-installer/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515:v1.11.4" install_image = "factory.talos.dev/nocloud-installer/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515:v1.11.6"
}, },
"192.168.10.105" = { "192.168.10.105" = {
install_disk = "/dev/vda" install_disk = "/dev/vda"
install_image = "factory.talos.dev/nocloud-installer/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515:v1.11.4" install_image = "factory.talos.dev/nocloud-installer/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515:v1.11.6"
}, },
"192.168.10.106" = { "192.168.10.106" = {
install_disk = "/dev/vda" install_disk = "/dev/vda"
install_image = "factory.talos.dev/nocloud-installer/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515:v1.11.4" install_image = "factory.talos.dev/nocloud-installer/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515:v1.11.6"
}, },
"192.168.10.107" = { "192.168.10.107" = {
install_disk = "/dev/vda" install_disk = "/dev/vda"
install_image = "factory.talos.dev/nocloud-installer/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515:v1.11.4" install_image = "factory.talos.dev/nocloud-installer/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515:v1.11.6"
}, },
} }
} }

View File

@@ -35,6 +35,7 @@ resource "talos_machine_configuration_apply" "controlplane" {
hostname = each.value.hostname == null ? format("%s-cp-%s", var.cluster_name, index(keys(var.node_data.controlplanes), each.key)) : each.value.hostname hostname = each.value.hostname == null ? format("%s-cp-%s", var.cluster_name, index(keys(var.node_data.controlplanes), each.key)) : each.value.hostname
install_disk = each.value.install_disk install_disk = each.value.install_disk
install_image = each.value.install_image install_image = each.value.install_image
dns = var.domain_name_server
ip_address = "${each.key}/24" ip_address = "${each.key}/24"
network = var.network network = var.network
network_gateway = var.network_gateway network_gateway = var.network_gateway
@@ -56,6 +57,7 @@ resource "talos_machine_configuration_apply" "worker" {
hostname = each.value.hostname == null ? format("%s-worker-%s", var.cluster_name, index(keys(var.node_data.workers), each.key)) : each.value.hostname hostname = each.value.hostname == null ? format("%s-worker-%s", var.cluster_name, index(keys(var.node_data.workers), each.key)) : each.value.hostname
install_disk = each.value.install_disk install_disk = each.value.install_disk
install_image = each.value.install_image install_image = each.value.install_image
dns = var.domain_name_server
ip_address = "${each.key}/24" ip_address = "${each.key}/24"
network = var.network network = var.network
network_gateway = var.network_gateway network_gateway = var.network_gateway

View File

@@ -1,9 +1,14 @@
machine: machine:
features:
hostDNS:
forwardKubeDNSToHost: false
install: install:
disk: ${install_disk} disk: ${install_disk}
image: ${install_image} image: ${install_image}
network: network:
hostname: ${hostname} hostname: ${hostname}
nameservers:
- ${dns}
interfaces: interfaces:
- deviceSelector: - deviceSelector:
physical: true physical: true

View File

@@ -1,9 +1,14 @@
machine: machine:
features:
hostDNS:
forwardKubeDNSToHost: false
install: install:
disk: ${install_disk} disk: ${install_disk}
image: ${install_image} image: ${install_image}
network: network:
hostname: ${hostname} hostname: ${hostname}
nameservers:
- ${dns}
interfaces: interfaces:
- deviceSelector: - deviceSelector:
physical: true physical: true

View File

@@ -22,24 +22,24 @@ variable "proxmox_storage_device" {
variable "talos_version" { variable "talos_version" {
type = string type = string
default = "1.11.4" default = "1.11.6"
} }
variable "kubernetes_version" { variable "kubernetes_version" {
type = string type = string
default = "1.34.1" default = "1.34.2"
} }
variable "talos_linux_iso_image_url" { variable "talos_linux_iso_image_url" {
description = "URL of the Talos ISO image for initially booting the VM" description = "URL of the Talos ISO image for initially booting the VM"
type = string type = string
default = "https://factory.talos.dev/image/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515/v1.11.4/nocloud-amd64.iso" default = "https://factory.talos.dev/image/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515/v1.11.6/nocloud-amd64.iso"
} }
variable "talos_linux_iso_image_filename" { variable "talos_linux_iso_image_filename" {
description = "Filename of the Talos ISO image for initially booting the VM" description = "Filename of the Talos ISO image for initially booting the VM"
type = string type = string
default = "talos-linux-v1.11.4-qemu-guest-agent-amd64.iso" default = "talos-linux-v1.11.6-qemu-guest-agent-amd64.iso"
} }
variable "cluster_name" { variable "cluster_name" {
@@ -72,13 +72,13 @@ variable "node_data" {
controlplanes = { controlplanes = {
"192.168.1.101" = { "192.168.1.101" = {
install_disk = "/dev/vda" install_disk = "/dev/vda"
install_image = "factory.talos.dev/nocloud-installer/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515:v1.11.4" install_image = "factory.talos.dev/nocloud-installer/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515:v1.11.6"
}, },
} }
workers = { workers = {
"192.168.1.102" = { "192.168.1.102" = {
install_disk = "/dev/vda" install_disk = "/dev/vda"
install_image = "factory.talos.dev/nocloud-installer/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515:v1.11.4" install_image = "factory.talos.dev/nocloud-installer/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515:v1.11.6"
}, },
} }
} }