Add /kubepods to egrep regex in entrypoint

This will ensure that the kubepods cgroup is correctly mounted, which
kubeadm uses. Without it, `kubeadm init` fails in Cloud Shell.
pull/9092/head
Priya Wadhwa 2020-08-25 15:53:03 -07:00
parent 374dab3f9b
commit f8b2a6c82a
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ fix_cgroup_mounts() {
# NOTE: This extracts fields 4 and on
# See https://man7.org/linux/man-pages/man5/proc.5.html for field names
cgroup_mounts=$(egrep -o '(/docker|libpod_parent).*/sys/fs/cgroup.*' /proc/self/mountinfo || true)
cgroup_mounts=$(egrep -o '(/docker|libpod_parent|/kubepods).*/sys/fs/cgroup.*' /proc/self/mountinfo || true)
if [[ -n "${cgroup_mounts}" ]]; then
local mount_root