Skip to content

Commit

Permalink
feat: add k8s machine type for more compute power
Browse files Browse the repository at this point in the history
  • Loading branch information
sydrawat01 committed Nov 27, 2023
1 parent 917bcfc commit db21d29
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/k8s/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ resource "google_container_node_pool" "gke_linux_node_pool" {

node_config {
preemptible = true
machine_type = "e2-small"
machine_type = var.k8s_machine_type
image_type = "COS_CONTAINERD"

labels = {
Expand Down
1 change: 1 addition & 0 deletions modules/k8s/variables.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
variable "vpc_name" {}
variable "subnet_name" {}
variable "region" {}
variable "k8s_machine_type" {}
variable "project_id" {}
variable "account_id_kubernetes" {}
variable "initial_node_count" {}
Expand Down
1 change: 1 addition & 0 deletions root/example.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ vpc_name = ""
subnet_name = ""
vm_name = ""
machine_type = ""
k8s_machine_type = ""
zone = ""
ssh_key_file = ""
cluster_master_ip_cidr_range = ""
Expand Down
1 change: 1 addition & 0 deletions root/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ module "k8s" {
vpc_name = var.vpc_name
subnet_name = var.subnet_name
region = var.region
k8s_machine_type = var.k8s_machine_type
account_id_kubernetes = var.account_id_kubernetes
initial_node_count = var.initial_node_count
max_node_count = var.max_node_count
Expand Down
8 changes: 7 additions & 1 deletion root/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@ variable "vm_name" {

variable "machine_type" {
type = string
description = "The compute instance machine type. Default machine has 8 vCPU and 32GiB vRAM"
description = "The bastion host machine type."
default = "e2-micro"
}

variable "k8s_machine_type" {
type = string
description = "The kubernetes cluster machine type. Default machine has 8 vCPU and 32GiB vRAM"
default = "e2-standard-8"
}

Expand Down

0 comments on commit db21d29

Please sign in to comment.