Skip to content

Commit

Permalink
Fix/conntrack sysctl2 (#20)
Browse files Browse the repository at this point in the history
* Inject sysctl changing nf_conntrack_max to 131072.

This addresses
#18
kubernetes-sigs/kind#2240

* Need to load nf_conntrack kmod for the sysctl setting.

* Add nf_conntrack to modules-load.d to ensure sysctl works.

This is required to be reboot safe.

Signed-off-by: Kurt Garloff <scs@garloff.de>
  • Loading branch information
garloff authored Aug 18, 2021
1 parent 4c2eedb commit d8eee42
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions terraform/mgmtcluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ runcmd:
- mv /tmp/daemon.json /etc/docker/daemon.json
- groupadd docker
- usermod -aG docker ${var.ssh_username}
- echo nf_conntrack > /etc/modules-load.d/90-nf_conntrack.conf
- modprobe nf_conntrack
- echo net.netfilter.nf_conntrack_max=131072 > /etc/sysctl.d/90-conntrack_max.conf
- sysctl -w -p /etc/sysctl.d/90-conntrack_max.conf
- apt -y install docker.io
EOF

Expand Down

0 comments on commit d8eee42

Please sign in to comment.