feat: Initial k8s cluster setup
This commit is contained in:
parent
dc71408e1b
commit
5def74736b
6 changed files with 233 additions and 0 deletions
68
pve01.wheatley.in/k8s-wheatley/main.tf
Normal file
68
pve01.wheatley.in/k8s-wheatley/main.tf
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
terraform {
|
||||
required_providers {
|
||||
proxmox = {
|
||||
source = "Telmate/proxmox"
|
||||
version = "3.0.2-rc05"
|
||||
}
|
||||
talos = {
|
||||
source = "siderolabs/talos"
|
||||
version = "0.9.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
provider "proxmox" {
|
||||
pm_api_url = "https://10.167.84.10:8006/api2/json"
|
||||
pm_api_token_id = ""
|
||||
pm_api_token_secret = ""
|
||||
pm_tls_insecure = true
|
||||
}
|
||||
|
||||
locals {
|
||||
talos_version = "1.11.3"
|
||||
}
|
||||
|
||||
module "controlplanes" {
|
||||
source = "./modules/controlplane"
|
||||
|
||||
controlplanes = {
|
||||
cpu = 4
|
||||
memory = 4
|
||||
disk = "40G"
|
||||
storagepool = "nvme-fastpool"
|
||||
talos_version = local.talos_version
|
||||
nodes = [
|
||||
{
|
||||
name = "cp01"
|
||||
ip_address = "10.13.38.20"
|
||||
},
|
||||
{
|
||||
name = "cp02"
|
||||
ip_address = "10.13.38.21"
|
||||
},
|
||||
{
|
||||
name = "cp03"
|
||||
ip_address = "10.13.38.22"
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
||||
module "workers" {
|
||||
source = "./modules/worker"
|
||||
|
||||
workers = {
|
||||
cpu = 4
|
||||
memory = 4
|
||||
disk = "40G"
|
||||
storagepool = "nvme-fastpool"
|
||||
talos_version = local.talos_version
|
||||
nodes = [
|
||||
{
|
||||
name = "worker01"
|
||||
ip_address = "10.13.38.30"
|
||||
},
|
||||
{
|
||||
name = "worker02"
|
||||
ip_address = "10.13.38.31"
|
||||
}]
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue