配置cgroup driver
正确在/etc/systemd/system/kubelet.service.d/10-kubeadm.conf
Environment="KUBELET_CGROUP_ARGS=--cgroup-driver=systemd"
我还检查了Environment
with cli
$ systemctl show --property=Environment kubelet | cat
Environment=KUBELET_KUBECONFIG_ARGS=--kubeconfig=/etc/kubernetes/kubelet.conf\x20--require-kubeconfig=true KUBELET_SYSTEM_PODS_ARGS=--pod-manifest-path=/etc/kubernetes/manifests\x20--allow-privileged=true KUBELET_NETWORK_ARGS=--network-plugin=cni\x20--cni-conf-dir=/etc/cni/net.d\x20--cni-bin-dir=/opt/cni/bin KUBELET_DNS_ARGS=--cluster-dns=10.96.0.10\x20--cluster-domain=cluster.local KUBELET_AUTHZ_ARGS=--authorization-mode=Webhook\x20--client-ca-file=/etc/kubernetes/pki/ca.crt KUBELET_CADVISOR_ARGS=--cadvisor-port=0 KUBELET_CGROUP_ARGS=--cgroup-driver=systemd
KUBELET_CGROUP_ARGS=--cgroup-driver=systemd
如何重现它:
- 百胜安装 -y docker-1.12.6
- systemctl enable docker && systemctl start docker
- 设置强制 0
- yum install -y kubelet kubeadm
- systemctl enable kubelet && systemctl start kubelet
- systemctl 守护进程重载
- systemctl 重启 kubelet
- kubelet 日志
环境:
- Kubernetes 版本(使用
kubectl version
):1.7.3 - 云提供商或硬件配置**:4 核 16G RAM
- 操作系统(例如来自 /etc/os-release):CentOS Linux 7(核心)
- 内核(例如
uname -a
):Linux 10-8-108-92 3.10.0-327.22.2.el7.x86_64 #1 SMP Thu Jun 23 17:05:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux - 安装工具:kubeadm