Skip to content

Commit

Permalink
Maintain dockershim compatibility symlink after instance reboot (#921)
Browse files Browse the repository at this point in the history
  • Loading branch information
otterley authored May 17, 2022
1 parent 8d6191f commit acc7115
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion files/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -466,13 +466,17 @@ fi
if [[ "$CONTAINER_RUNTIME" = "containerd" ]]; then
sudo mkdir -p /etc/containerd
sudo mkdir -p /etc/cni/net.d
mkdir -p /etc/systemd/system/containerd.service.d
cat <<EOF > /etc/systemd/system/containerd.service.d/10-compat-symlink.conf
[Service]
ExecStartPre=/bin/ln -sf /run/containerd/containerd.sock /run/dockershim.sock
EOF
sudo sed -i s,SANDBOX_IMAGE,$PAUSE_CONTAINER,g /etc/eks/containerd/containerd-config.toml
sudo cp -v /etc/eks/containerd/containerd-config.toml /etc/containerd/config.toml
sudo cp -v /etc/eks/containerd/sandbox-image.service /etc/systemd/system/sandbox-image.service
sudo cp -v /etc/eks/containerd/kubelet-containerd.service /etc/systemd/system/kubelet.service
sudo chown root:root /etc/systemd/system/kubelet.service
sudo chown root:root /etc/systemd/system/sandbox-image.service
ln -sf /run/containerd/containerd.sock /run/dockershim.sock
systemctl daemon-reload
systemctl enable containerd
systemctl restart containerd
Expand Down

0 comments on commit acc7115

Please sign in to comment.