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
parent
374dab3f9b
commit
f8b2a6c82a
|
@ -82,7 +82,7 @@ fix_cgroup_mounts() {
|
||||||
|
|
||||||
# NOTE: This extracts fields 4 and on
|
# NOTE: This extracts fields 4 and on
|
||||||
# See https://man7.org/linux/man-pages/man5/proc.5.html for field names
|
# 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
|
if [[ -n "${cgroup_mounts}" ]]; then
|
||||||
local mount_root
|
local mount_root
|
||||||
|
|
Loading…
Reference in New Issue