본문 바로가기

리눅스

쿠버네티스 kubeadm init 오류

728x90

쿠버네티스 kubeadm init 오류

sudo kubeadm init --pod-network-cidr=10.244.0.0/16 --apiserver-advertise-address=192.168.56.51
[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred: [ERROR CRI]: container runtime is not running: output: time="2024-02-16T11:11:12+09:00" level=fatal msg="validate service connection: CRI v1 runtime API is not implemented for endpoint \"unix:///var/run/containerd/containerd.sock\": rpc error: code = Unimplemented desc = unknown service runtime.v1.RuntimeService"
, error: exit status 1

이 오류는 컨테이너 런타임 (CRI)이 실행되지 않았기 때문에 발생합니다. 일반적으로 Kubernetes는 Docker, containerd, cri-o 등의 CRI를 사용하여 컨테이너를 관리합니다.

$ sudo kubeadm init --pod-network-cidr=10.244.0.0/16 --apiserver-advertise-address=192.168.56.51
I0216 11:11:11.550480    8827 version.go:256] remote version is much newer: v1.29.2; falling back to: stable-1.28
[init] Using Kubernetes version: v1.28.7
[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred:
        [ERROR CRI]: container runtime is not running: output: time="2024-02-16T11:11:12+09:00" level=fatal msg="validate service connection: CRI v1 runtime API is not implemented for endpoint \"unix:///var/run/containerd/containerd.sock\": rpc error: code = Unimplemented desc = unknown service runtime.v1.RuntimeService"
, error: exit status 1
[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

해결 방법

  • 컨테이너 런타임 재실행
sudo rm -f /etc/containerd/config.toml
sudo systemctl restart containerd
  • 쿠버네티스 초기화
sudo kubeadm init --pod-network-cidr=10.244.0.0/16 --apiserver-advertise-address=192.168.56.51

 

728x90