• 카테고리

    질문 & 답변
  • 세부 분야

    데브옵스 · 인프라

  • 해결 여부

    미해결

마스터 노드 초기화 단계에서 kubeadm init 명령어 사용시 에러 발생

23.03.29 17:36 작성 조회수 2.33k

1

마스터 노드 초기화 단계에서 kubeadm init 명령어 사용시 container runtime이 동작하지 않는다는 아래와 같은 에러코드 발생하여 문의드립니다.

 

[init] Using Kubernetes version: v1.26.3

[preflight] Running pre-flight checks

error execution phase preflight: [preflight] Some fatal errors occurred:

[ERROR CRI]: container runtime is not running: output: time="2023-03-29T08:31:55Z" 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

답변 2

·

답변을 작성해보세요.

0

박지용님의 프로필

박지용

2023.08.01

안녕하세요 동일한 문제로 질문드려요.
/etc/containerd/config.toml 파일의 옵션을 구성한다는것이 이해가 잘안되네요 ㅠ
우선 toml 파일은 삭제를 했고, 삭제 전 내용은 아래와 같습니다.

# Copyright 2018-2022 Docker Inc.

# Licensed under the Apache License, Version 2.0 (the "License");

# you may not use this file except in compliance with the License.

# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software

# distributed under the License is distributed on an "AS IS" BASIS,

# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

# See the License for the specific language governing permissions and

# limitations under the License.

disabled_plugins = ["cri"]

#root = "/var/lib/containerd"

#state = "/run/containerd"

#subreaper = true

#oom_score = 0

#[grpc]

# address = "/run/containerd/containerd.sock"

# uid = 0

# gid = 0

#[debug]

# address = "/run/containerd/debug.sock"

# uid = 0

# gid = 0

# level = "info"

gasbugs님의 프로필

gasbugs

2023.08.17

안녕하세요 박지용님

설치 진행 시 사용했던 스크립트 내용 중간에 보면 tee라는 명령으로 toml 파일을 구성하는 내용이 있습니다. 해당 명령으로 toml 파일에 옵션을 추가할 수 있는데, 2번 동일한 명령을 실행하면 동일한 옵션이 두 번 들어가서 오류가 발생합니다. 그래서 파일 삭제 후 다시 생성해 달라고 요청한 것입니다.

감사합니다.

이현우님의 프로필

이현우

2024.01.11

저처럼 구글링하다가 보실 분들을 대비해 답변 남겨놓습니다.
$ sudo vi /etc/containerd/config.toml
disabled_plugins = ["cri"]

위 내용 주석처리

$ sudo systemctl restart containerd
이후에 kubeadm init 명령 실행 시 정상적으로 동작했습니다.

0

gasbugs님의 프로필

gasbugs

2023.03.29

안녕하세요 김선규님

강사 최일선입니다.

해당 오류는 containerd 설정 파일인 toml 파일이 문제일 때 발생할 수 있습니다.

cat /etc/containerd/config.toml 으로 내용을 확인해보시면 옵션이 중복되어 들어갈 수 있습니다.

그러면 오류가 발생하므로 sudo rm /etc/containerd/config.toml 으로 파일을 삭제하시고 다시 /etc/containerd/config.toml 파일의 옵션을 구성하는 것이 좋습니다.

감사합니다.