Change cgroup driver from cgroupfs to systemd
The minikube iso is using systemd, so change the container runtime
to use the same cgroup manager instead of the default (cgroupfs).
Avoids kubeadm init message:
[WARNING IsDockerSystemdCheck]:
detected "cgroupfs" as the Docker cgroup driver.
The recommended driver is "systemd".
Also change the configuration for the containerd and cri-o runtimes.
pull/6651/head
parent
dba9ce14ad
commit
3398013249
|
|
@ -31,7 +31,7 @@ oom_score = 0
|
|||
enable_selinux = false
|
||||
sandbox_image = "k8s.gcr.io/pause:3.1"
|
||||
stats_collect_period = 10
|
||||
systemd_cgroup = false
|
||||
systemd_cgroup = true
|
||||
enable_tls_streaming = false
|
||||
max_container_log_line_size = 16384
|
||||
[plugins.cri.containerd]
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ seccomp_profile = ""
|
|||
apparmor_profile = "crio-default-1.16.1"
|
||||
|
||||
# Cgroup management implementation used for the runtime.
|
||||
cgroup_manager = "cgroupfs"
|
||||
cgroup_manager = "systemd"
|
||||
|
||||
# List of default capabilities for containers. If it is empty or commented out,
|
||||
# only the capabilities defined in the containers json file by the user/kube
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"exec-opts": [
|
||||
"native.cgroupdriver=systemd"
|
||||
],
|
||||
"log-driver": "json-file",
|
||||
"log-opts": {
|
||||
"max-size": "100m"
|
||||
},
|
||||
"storage-driver": "overlay2"
|
||||
}
|
||||
|
|
@ -34,6 +34,12 @@ define DOCKER_BIN_INSTALL_TARGET_CMDS
|
|||
$(INSTALL) -D -m 0755 \
|
||||
$(@D)/docker-proxy \
|
||||
$(TARGET_DIR)/bin/docker-proxy
|
||||
|
||||
# https://kubernetes.io/docs/setup/production-environment/container-runtimes/#docker
|
||||
|
||||
$(INSTALL) -Dm644 \
|
||||
$(DOCKER_BIN_PKGDIR)/daemon.json \
|
||||
$(TARGET_DIR)/etc/docker/daemon.json
|
||||
endef
|
||||
|
||||
define DOCKER_BIN_INSTALL_INIT_SYSTEMD
|
||||
|
|
|
|||
Loading…
Reference in New Issue