mirror of
https://github.com/khuedoan/homelab.git
synced 2025-01-05 21:11:52 +07:00
Attach controllers and workers to network
This commit is contained in:
parent
1b2082e91c
commit
a755755911
@ -3,7 +3,7 @@ provider "lxd" {
|
||||
accept_remote_certificate = true
|
||||
}
|
||||
|
||||
resource "lxd_network" "kubernetes_subnetwork" {
|
||||
resource "lxd_network" "kubernetes_network" {
|
||||
name = "kubernetes"
|
||||
|
||||
config = {
|
||||
@ -25,6 +25,16 @@ resource "lxd_container" "kubernetes_controllers" {
|
||||
limits = {
|
||||
cpu = 2
|
||||
}
|
||||
|
||||
device {
|
||||
name = "eth0"
|
||||
type = "nic"
|
||||
|
||||
properties = {
|
||||
nictype = "bridged"
|
||||
parent = "${lxd_network.kubernetes_network.name}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "lxd_container" "kubernetes_workers" {
|
||||
@ -40,4 +50,14 @@ resource "lxd_container" "kubernetes_workers" {
|
||||
limits = {
|
||||
cpu = 2
|
||||
}
|
||||
|
||||
device {
|
||||
name = "eth0"
|
||||
type = "nic"
|
||||
|
||||
properties = {
|
||||
nictype = "bridged"
|
||||
parent = "${lxd_network.kubernetes_network.name}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user