본문 바로가기

리눅스

[Kubernetes] Kubernetes docker cgroupfs 오류

반응형

docker cgroupfs 오류

$ kubeadm init --apiserver-advertise-address=10.255.255.111 --pod-network-cidr=10.255.1.0/24
W1004 20:24:32.378748    9552 configset.go:348] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
[init] Using Kubernetes version: v1.19.2
[preflight] Running pre-flight checks
        [WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
        [WARNING Hostname]: hostname "bk8sm1" could not be reached
        [WARNING Hostname]: hostname "bk8sm1": lookup bk8sm1 on 8.8.8.8:53: no such host
        [WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
error execution phase preflight: [preflight] Some fatal errors occurred:
        [ERROR NumCPU]: the number of available CPUs 1 is less than the required 2
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
To see the stack trace of this error execute with --v=5 or higher

 

cgroup 드라이버 : cgroupfs

$ docker info | grep -i cgroup
 Cgroup Driver: cgroupfs

 

도커 데몬 편집

###Set up the Docker daemon
$ cat <<EOF | sudo tee /etc/docker/daemon.json
{
  "exec-opts": ["native.cgroupdriver=systemd"],
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "100m"
  },
  "storage-driver": "overlay2"
}
EOF

###Restart Docker
$ systemctl daemon-reload
$ systemctl restart docker

 

cgroup 드라이버 : systemd

$ docker info | grep -i cgroup                                                                                   
 Cgroup Driver: systemd

 

쿠버네티스 가이드

 

Container runtimes

FEATURE STATE: Kubernetes v1.6 [stable] To run containers in Pods, Kubernetes uses a container runtime. Here are the installation instructions for various runtimes. Caution: A flaw was found in the way runc handled system file descriptors when running cont

kubernetes.io

 

 

728x90
반응형