Skip to content

Commit

Permalink
fix(k8s): workaround for long shutdown bug
Browse files Browse the repository at this point in the history
This makes "reboot" behave as a "hard rest" from a container standpoint.
  • Loading branch information
gila committed Sep 20, 2021
1 parent 655ffa9 commit 9265ee9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions terraform/mod/k8s/repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,17 @@ sudo sysctl --system
sudo mkdir -p /etc/containerd
sudo containerd config default | sudo tee /etc/containerd/config.toml

# Rebooting a node does not kill the containers they are running resulting
# in a vary long timeout before the system moves forward.
#
# There are various bugs upstream detailing this and it supposed to be fixed a few weeks ago (June)
# This is *not* that fix rather a work around. The containers will not shut down "cleanly".
sudo mkdir -p /etc/systemd/system/containerd.service.d
sudo tee /etc/sysctl.d/system/containerd.service.d/override.conf >/dev/null <<EOF
[Service]
KillMode=mixed
EOF


# Restart containerd
sudo systemctl restart containerd

0 comments on commit 9265ee9

Please sign in to comment.