Skip to content

Commit

Permalink
refactor: change k9s installation
Browse files Browse the repository at this point in the history
  • Loading branch information
lterrac committed Sep 16, 2022
1 parent 9746ec4 commit ef722c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module "master_region" {
region = "us-east-2"

master = true
master_instance_type = "c5.4xlarge"
master_instance_type = "c5.xlarge"
worker_instance_type = "c5.xlarge"
cpu_instances = 1
gpu_instances = 0
Expand Down
8 changes: 7 additions & 1 deletion modules/regional_cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,17 @@ resource "null_resource" "master_init" {
"sudo apt update",
"sudo apt upgrade -y",
"sudo apt install -y docker.io",
"sudo apt install -y linuxbrew-wrapper",
"sudo apt install -y wget",
"sudo apt install -y tar",
"sudo systemctl start docker",
"sudo systemctl enable docker",
"sudo cp -r ./k3s /usr/local/bin/",
"sudo snap install helm --classic",
"sudo snap install go --classic",
"wget https://github.com/derailed/k9s/releases/download/v0.26.3/k9s_Linux_x86_64.tar.gz",
"tar -xvf k9s_Linux_x86_64.tar.gz",
"chmod +x k9s",
"sudo mv k9s /usr/bin",
]
}
provisioner "remote-exec" {
Expand All @@ -279,6 +284,7 @@ resource "null_resource" "master_init" {
# "curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE=666 INSTALL_K3S_EXEC='server --token=${random_password.k3s[0].result} --node-external-ip=${module.master[0].public_ip} --node-name=${module.master[0].node_name} --docker --cluster-init --write-kubeconfig-mode 777 --kube-apiserver-arg=feature-gates=ServiceTopology=true' sh -",
]
}

provisioner "remote-exec" {
inline = [
"mkdir /home/ubuntu/.kube",
Expand Down

0 comments on commit ef722c5

Please sign in to comment.