Failed to launch kubelet after rebooting

The default behavior of crio service is `disable` if you install it with
devstack. So, kubelet cannot launch after rebooting a host because crio
isn't run on the host before. To fix the issue, enable crio in systemctl
while installing kubeadm.

Closes-Bug: #2027866
Change-Id: I990ea9a6eb576f7cffb6b5a84519cdf90840db34
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
This commit is contained in:
Yasufumi Ogawa 2023-07-15 19:39:17 +00:00
parent 9cd15b6d37
commit c01326bf15
1 changed files with 7 additions and 0 deletions

View File

@ -36,6 +36,13 @@ distribution.")
# See https://github.com/kubernetes/kubeadm/issues/203
echo "KUBELET_EXTRA_ARGS=--node-ip=$HOST_IP" | sudo tee -a \
/etc/default/kubelet
# NOTE(yasufum): Enable crio which is disabled if it's installed via apt,
# or failed to launch kubelet.
if [[ ${CONTAINER_ENGINE} == 'crio' ]]; then
sudo systemctl enable crio
fi
sudo systemctl daemon-reload && sudo systemctl restart kubelet
}