You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo"WARN: UserNS: SELinux might be Enforcing. If you see an error related to overlayfs, try setting \`KIND_EXPERIMENTAL_CONTAINERD_SNAPSHOTTER=fuse-overlayfs\` .">&2
94
-
fi
95
-
return 0
64
+
if [[ -z"$userns" ]];then
65
+
# If we are outside userns, we can always assume overlayfs is preferrable
66
+
return 0
67
+
fi
68
+
69
+
# Debian 10 and 11 supports overlayfs in userns with a "permit_mount_in_userns" kernel patch,
70
+
# but known to be unstable, so we avoid using it https://github.com/moby/moby/issues/42302
71
+
if [[ -e"/sys/module/overlay/parameters/permit_mounts_in_userns" ]];then
72
+
echo"INFO: UserNS: kernel seems supporting overlayfs with permit_mounts_in_userns, but avoiding due to instability."
73
+
return 1
74
+
fi
75
+
76
+
# Check overlayfs availability, by attempting to mount it.
77
+
#
78
+
# Overlayfs inside userns is known to be available for the following environments:
79
+
# - Kernel >= 5.11 (but 5.11 and 5.12 have issues on SELinux hosts. Fixed in 5.13.)
80
+
# - Ubuntu kernel
81
+
# - Debian kernel (but avoided due to instability, see the /sys/module/overlay/... check above)
82
+
# - Sysbox
83
+
tmp=$(mktemp -d)
84
+
mkdir -p "${tmp}/l""${tmp}/u""${tmp}/w""${tmp}/m"
85
+
if! mount -t overlay -o lowerdir="${tmp}/l,upperdir=${tmp}/u,workdir=${tmp}/w" overlay "${tmp}/m";then
86
+
echo"INFO: UserNS: kernel does not seem to support overlayfs."
87
+
rm -rf "${tmp}"
88
+
return 1
89
+
fi
90
+
umount "${tmp}/m"
91
+
rm -rf "${tmp}"
92
+
93
+
# Detect whether SELinux is Enforcing (or Permitted) by grepping /proc/self/attr/current .
94
+
# Note that we cannot use `getenforce` command here because /sys/fs/selinux is typically not mounted for containers.
95
+
if grep -q "_t:""/proc/self/attr/current";then
96
+
# When the kernel is before v5.13 and SELinux is enforced, fuse-overlayfs might be safer, so we print a warning (but not an error).
echo"WARN: UserNS: SELinux might be Enforcing. If you see an error related to overlayfs, try setting \`KIND_EXPERIMENTAL_CONTAINERD_SNAPSHOTTER=fuse-overlayfs\` .">&2
99
+
fi
100
+
return 0
96
101
}
97
102
98
103
configure_containerd() {
@@ -156,7 +161,7 @@ update-alternatives() {
156
161
}
157
162
158
163
fix_mount() {
159
-
echo'INFO: ensuring we can execute mount/umount even with userns-remap'
164
+
echo'INFO: ensuring we can execute mount/umount even with userns-remap'
160
165
# necessary only when userns-remap is enabled on the host, but harmless
161
166
# The binary /bin/mount should be owned by root and have the setuid bit
162
167
chown root:root "$(which mount)""$(which umount)"
@@ -231,6 +236,8 @@ fix_cgroup() {
231
236
return
232
237
fi
233
238
echo'INFO: detected cgroup v1'
239
+
# We're looking for the cgroup-path for the cpu controller for the
240
+
# current process. this tells us what cgroup-path the container is in.
Copy file name to clipboardExpand all lines: site/content/en/docs/commands/start.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ minikube start [flags]
26
26
--apiserver-names strings A set of apiserver names which are used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine
27
27
--apiserver-port int The apiserver listening port (default 8443)
28
28
--auto-update-drivers If set, automatically updates drivers to the latest version. Defaults to true. (default true)
29
-
--base-image string The base image to use for docker/podman drivers. Intended for local development. (default "gcr.io/k8s-minikube/kicbase-builds:v0.0.32-1656700284-14481@sha256:96d18f055abcf72b9f587e13317d6f9b5bb6f60e9fa09d6c51e11defaf9bf842")
29
+
--base-image string The base image to use for docker/podman drivers. Intended for local development. (default "gcr.io/k8s-minikube/kicbase-builds:v0.0.32-1659115536-14579@sha256:73b259e144d926189cf169ae5b46bbec4e08e4e2f2bd87296054c3244f70feb8")
--cache-images If true, cache docker images for the current bootstrapper and load them into the machine. Always false with --driver=none. (default true)
32
32
--cert-expiration duration Duration until minikube certificate expiration, defaults to three years (26280h). (default 26280h0m0s)
0 commit comments