본문 바로가기

Kubernetes

[Kubernetes] kubeadm init 실행시 unknown service runtime.v1alpha2.RuntimeService 발생

반응형

Kubernetes 설치중 kubeadm init 명령어 실행시 아래와 같은 에러가 발생할 수 있다.

# kubeadm init
[init] Using Kubernetes version: v1.25.4
[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred:
	[ERROR CRI]: container runtime is not running: output: E1123 22:39:08.027506   12107 remote_runtime.go:948] "Status from runtime service failed" err="rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService"
time="2022-11-23T22:39:08+09:00" level=fatal msg="getting status of runtime: rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.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

 

unknown service runtime.v1alpha2.RuntimeService 에러가 발생하면 컨테이너 런타임에서 CRI(Container Runtime Interface) 기능을 비활성화 한 경우이므로 아래와 같은 방법으로 해결한다. (master, node 에서 모두 진행)

 

# sudo rm /etc/containerd/config.toml
# sudo systemctl restart containerd
# sudo kubeadm init

 

※ /etc/containerd/config.toml

#   Copyright 2018-2020 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"
반응형

'Kubernetes' 카테고리의 다른 글

[Kubernetes] Pod - livenessProbe  (0) 2022.11.27
[Kubernetes] Pod 란?  (0) 2022.11.24
[Kubernetes] API version  (0) 2022.09.30
[Kubernetes] yaml 템플릿이란?  (0) 2022.09.30
[Kubernetes] Base namespace switch  (1) 2022.09.30