From 1b2082e91cbf6de1b8e3b4ac98811899dbc3f4ca Mon Sep 17 00:00:00 2001 From: Khue Doan Date: Mon, 20 Jul 2020 14:14:13 +0700 Subject: [PATCH] Add worker nodes --- terraform/main.tf | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/terraform/main.tf b/terraform/main.tf index a47f0bae..47215940 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -12,9 +12,24 @@ resource "lxd_network" "kubernetes_subnetwork" { } } -resource "lxd_container" "test1" { +resource "lxd_container" "kubernetes_controllers" { count = 3 - name = "test-${count.index}" + name = "controller-${count.index}" + image = "images:ubuntu/18.04" + ephemeral = false + + config = { + "boot.autostart" = true + } + + limits = { + cpu = 2 + } +} + +resource "lxd_container" "kubernetes_workers" { + count = 3 + name = "worker-${count.index}" image = "images:ubuntu/18.04" ephemeral = false