Skip to content

Commit

Permalink
Add firewall rules to allow prometheus to reach node-exporter
Browse files Browse the repository at this point in the history
* node_exporter service endpoints run on hostNetwork port 9100
* Re-evaluate after kubernetes-retired/bootkube#711
  • Loading branch information
dghubble authored and justaugustus committed Feb 11, 2018
1 parent fdd5536 commit 77f1ab8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions aws/container-linux/kubernetes/controllers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,16 @@ resource "aws_security_group_rule" "controller-flannel-self" {
self = true
}

resource "aws_security_group_rule" "controller-node-exporter" {
security_group_id = "${aws_security_group.controller.id}"

type = "ingress"
protocol = "tcp"
from_port = 9100
to_port = 9100
source_security_group_id = "${aws_security_group.worker.id}"
}

resource "aws_security_group_rule" "controller-kubelet-read" {
security_group_id = "${aws_security_group.controller.id}"

Expand Down
10 changes: 10 additions & 0 deletions aws/container-linux/kubernetes/workers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,16 @@ resource "aws_security_group_rule" "worker-flannel-self" {
self = true
}

resource "aws_security_group_rule" "worker-node-exporter" {
security_group_id = "${aws_security_group.worker.id}"

type = "ingress"
protocol = "tcp"
from_port = 9100
to_port = 9100
self = true
}

resource "aws_security_group_rule" "worker-kubelet" {
security_group_id = "${aws_security_group.worker.id}"

Expand Down

0 comments on commit 77f1ab8

Please sign in to comment.