Add explanation for Pod IP addresses.

This commit is contained in:
Tom Alexander
2025-03-15 16:25:25 -04:00
parent fbb8376ccc
commit f3c22c18e5
8 changed files with 159 additions and 48 deletions

View File

@@ -0,0 +1,14 @@
resource "kubernetes_config_map" "ip_masq_agent" {
count = var.enable_snat ? 1 : 0
metadata {
name = "ip-masq-agent"
namespace = "kube-system"
}
data = {
config = "nonMasqueradeCIDRs:\n - 100.64.0.0/19\n - 240.10.0.0/17\nmasqLinkLocal: false\nresyncInterval: 60s\n"
}
depends_on = [var.node_pool]
}

View File

@@ -29,6 +29,11 @@ variable "main_k8s_namespace" {
type = string
}
variable "enable_snat" {
description = "Whether we should enable source network address translation to the node IP address."
type = bool
}
# Provide time for Service cleanup
resource "time_sleep" "wait_service_cleanup" {
depends_on = [var.cluster]