Files
learn-devops/opentofu/kubeadm/node-03.tf
github-actions[bot] 07fb0c68bf Add kubeadm example (#4)
* Add kubeadm example

* Fix dns

---------

Co-authored-by: Fedor Batonogov <f.batonogov@yandex.ru>
2024-04-25 19:37:15 +03:00

71 lines
1.2 KiB
HCL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Машинка
resource "proxmox_virtual_environment_vm" "kubeadm-node-03" {
name = "kubeadm-node-03"
migrate = true
description = "Managed by OpenTofu"
tags = ["kubeadm", "test"]
on_boot = true
# Указываем целевой узел, на котором будет запущена ВМ
node_name = "pve-03"
# Шоблон из которого будет создавать ВМ
clone {
vm_id = "2204"
node_name = "pve-01"
retries = 2
}
# Активируем QEMU для этов ВМ
agent {
enabled = true
}
operating_system {
type = "l26"
}
cpu {
cores = 4
type = "host"
numa = true
}
memory {
dedicated = 32768
}
disk {
size = "500"
interface = "virtio0"
datastore_id = "k8s-data-01"
file_format = "raw"
}
network_device {
bridge = "vmbr0"
model = "virtio"
}
initialization {
datastore_id = "k8s-data-01"
ip_config {
ipv4 {
address = "10.0.70.74/24"
gateway = "10.0.70.101"
}
}
dns {
servers = [
"77.88.8.8"
]
}
user_account {
username = "infra"
keys = [
"ssh-rsa..."
]
}
}
}