GlorifiedTypist / k3s-oracle-cloud-free-tier

Create a k3s cluster on Oracle Cloud's free for life tier
GNU General Public License v3.0
28 stars 21 forks source link

Error: 400-LimitExceeded, NAT gateway limit per VCN reached #16

Open NickMcGrath opened 2 years ago

NickMcGrath commented 2 years ago

I keep getting this error on terraform apply :(

│ Error: Post "https://140.238.147.58:6443/api/v1/namespaces": dial tcp 140.238.147.58:6443: i/o timeout
│
│   with module.free-tier-k3s.kubernetes_namespace.nginx-ingress,
│   on modules/free-tier-k3s/helm.tf line 2, in resource "kubernetes_namespace" "nginx-ingress":
│    2: resource "kubernetes_namespace" "nginx-ingress" {
│
╵
╷
│ Error: 400-LimitExceeded, NAT gateway limit per VCN reached
│ Suggestion: Request a service limit increase for this resource Core Nat Gateway
│ Documentation: https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/core_nat_gateway
│ API Reference: https://docs.oracle.com/iaas/api/#/en/iaas/20160918/NatGateway/CreateNatGateway
│ Request Target: POST https://iaas.ca-toronto-1.oraclecloud.com/20160918/natGateways
│ Provider version: 4.77.0, released on 2022-05-26.
│ Service: Core Nat Gateway
│ Operation Name: CreateNatGateway
│ OPC request ID: 3b3359d3d2075c6867ed944e0786d653/342105E2ECAC54B22079CA8CD78DE35D/157401C0E973CFF37ADF634D4EE1BB56
│
│
│   with module.free-tier-k3s.oci_core_nat_gateway.private_subnet,
│   on modules/free-tier-k3s/network.tf line 14, in resource "oci_core_nat_gateway" "private_subnet":
│   14: resource "oci_core_nat_gateway" "private_subnet" {

main.tf:

module "free-tier-k3s" {
  source = "./modules/free-tier-k3s"

  # General
  project_name   = "ftk3s"
  region         = var.region
  compartment_id = "ocid1.tenancy.oc1..aaaaaaaaqdgqxgpmg3d5bgaaejw7oujkwixgynxtbevqwv4dkomftkluvl4a"
  ssh_public_key = file("/home/nick/.ssh/id_rsa.pub")

  # Network
  whitelist_subnets = [
    "0.0.0.0/0",
    "10.0.0.0/8"
  ]

  vcn_subnet     = "10.0.0.0/16"
  private_subnet = "10.0.2.0/23"
  public_subnet  = "10.0.0.0/23"

  freetier_server_ad_list = 1
  freetier_worker_ad_list = [ 1 ]
}

terraform.auto.tfvars:

# This must be your home region to take advantage of the free tier
region = "ca-toronto-1"
NickMcGrath commented 2 years ago

From here: https://community.oracle.com/tech/apps-infra/discussion/4493649/unable-to-create-a-nat-gateway

We can see that we image

Where we have a free tier limit of 0 NAT Gateways SadBabyGIF