diff --git a/infra/vultr-kubernetes/backend.tf b/infra/vultr-kubernetes/backend.tf index b310af3..e97929e 100644 --- a/infra/vultr-kubernetes/backend.tf +++ b/infra/vultr-kubernetes/backend.tf @@ -13,7 +13,7 @@ terraform { } vultr = { source = "vultr/vultr" - version = "2.16.4" + version = "2.19.0" } } } diff --git a/infra/vultr-kubernetes/cluster.tf b/infra/vultr-kubernetes/cluster.tf index 387e8b6..c06ca76 100644 --- a/infra/vultr-kubernetes/cluster.tf +++ b/infra/vultr-kubernetes/cluster.tf @@ -2,6 +2,7 @@ resource vultr_kubernetes athens { region = var.cluster.region version = var.cluster.version label = var.cluster.label + enable_firewall = true node_pools { # how many pools do we want node_quantity = 1 diff --git a/infra/vultr-kubernetes/firewall.tf b/infra/vultr-kubernetes/firewall.tf new file mode 100644 index 0000000..4c6766c --- /dev/null +++ b/infra/vultr-kubernetes/firewall.tf @@ -0,0 +1,12 @@ +# Inbound rules for web traffic +resource vultr_firewall_rule web_inbound { + for_each = toset([for port in [80, 443] : tostring(port) ]) + firewall_group_id = vultr_kubernetes.athens.firewall_group_id + #firewall_group_id = vultr_firewall_group.cluster.id + protocol = "tcp" + ip_type = "v4" + subnet = "0.0.0.0" + subnet_size = 0 + port = each.value +} + diff --git a/infra/vultr-kubernetes/readme.md b/infra/vultr-kubernetes/readme.md index 760cc66..938b865 100644 --- a/infra/vultr-kubernetes/readme.md +++ b/infra/vultr-kubernetes/readme.md @@ -1,5 +1,11 @@ # Kubernetes Cluster On Vultr +# Kubectl Fresh setup + + +Check this link for installation instructions on \*nix systems: + +https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/ diff --git a/k8s/readme.md b/k8s/readme.md new file mode 100644 index 0000000..eed4316 --- /dev/null +++ b/k8s/readme.md @@ -0,0 +1,3 @@ +# What is this + +This folder contains various services that I host on Vultrs Kuberentes Engine