Attach controllers and workers to network

This commit is contained in:
Khue Doan 2020-07-20 14:20:11 +07:00
parent 1b2082e91c
commit a755755911

View File

@ -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}"
}
}
}