aws: Open port 9253 for node-local-dns metrics
node-local-dns runs on host network. And the node-local-dns metrics port
is exposed on 9253, on AWS it needs to be exposed explicitly.
@@ -168,6 +168,19 @@ resource "aws_security_group_rule" "controller-egress" {
ipv6_cidr_blocks = ["::/0"]
}
+resource "aws_security_group_rule" "controller-node-local-dns-metrics-port" {
+ count = var.enable_node_local_dns ? 1 : 0
+
+ security_group_id = aws_security_group.controller.id
+
+ type = "ingress"
+ protocol = "tcp"
+ from_port = 9253
+ to_port = 9253
+ source_security_group_id = aws_security_group.worker.id
+}
+
+
# Worker security group
resource "aws_security_group" "worker" {
@@ -337,3 +350,15 @@ resource "aws_security_group_rule" "worker-nodeport" {
to_port = 32767
self = true
}
+
+resource "aws_security_group_rule" "worker-node-local-dns-metrics-port" {
+ count = var.enable_node_local_dns ? 1 : 0
+
+ security_group_id = aws_security_group.worker.id
+
+ type = "ingress"
+ protocol = "tcp"
+ from_port = 9253
+ to_port = 9253
+ self = true
+}
