记录一次安装k8s初始化失败

实例化

bash 复制代码
 kubeadm init --config=kubeadm.yaml --ignore-preflight-errors=SystemVerification

报错

bash 复制代码
[init] Using Kubernetes version: v1.25.0
[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred:
        [ERROR CRI]: container runtime is not running: output: time="2024-05-27T14:24:00+08:00" level=fatal msg="validate service connection: CRI v1 runtime API is not implemented for endpoint \"unix:///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

看报错提示CRI v1 runtime API is not implemented for endpoint "unix:///run/containerd/containerd.sock,报错说明containerd 没有启动,我们看下containerd 状态

bash 复制代码
crictl info
FATA[0000] validate service connection: CRI v1 runtime API is not implemented for endpoint "unix:///run/containerd/containerd.sock": rpc error: code = Unimplemented desc = unknown service runtime.v1.RuntimeService 
bash 复制代码
systemctl status containerd 
● containerd.service - containerd container runtime
   Loaded: loaded (/usr/lib/systemd/system/containerd.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2024-05-25 15:00:45 CST; 1 day 23h ago
     Docs: https://containerd.io
  Process: 17742 ExecStartPre=/sbin/modprobe overlay (code=exited, status=0/SUCCESS)
 Main PID: 17744 (containerd)
    Tasks: 10
   Memory: 16.4M
   CGroup: /system.slice/containerd.service
           └─17744 /usr/bin/containerd

May 25 15:00:45 node4 containerd[17744]: time="2024-05-25T15:00:45.244945213+08:00" level=error m...gin"
May 25 15:00:45 node4 containerd[17744]: time="2024-05-25T15:00:45.245036348+08:00" level=info ms...l.v1
May 25 15:00:45 node4 containerd[17744]: time="2024-05-25T15:00:45.245143134+08:00" level=info ms...c.v1
May 25 15:00:45 node4 containerd[17744]: time="2024-05-25T15:00:45.245165036+08:00" level=info ms...c.v1
May 25 15:00:45 node4 containerd[17744]: time="2024-05-25T15:00:45.245596769+08:00" level=info ms...ices
May 25 15:00:45 node4 containerd[17744]: time="2024-05-25T15:00:45.245678125+08:00" level=info ms...ice"
May 25 15:00:45 node4 containerd[17744]: time="2024-05-25T15:00:45.245791893+08:00" level=warning...s\""
May 25 15:00:45 node4 containerd[17744]: time="2024-05-25T15:00:45.246066102+08:00" level=info ms...trpc
May 25 15:00:45 node4 containerd[17744]: time="2024-05-25T15:00:45.246138980+08:00" level=info ms...sock
May 25 15:00:45 node4 containerd[17744]: time="2024-05-25T15:00:45.246224876+08:00" level=info ms...99s"
Hint: Some lines were ellipsized, use -l to show in full.

可以看error里面是由错误的。

bash 复制代码
 journalctl -fu containerd
bash 复制代码
May 25 15:00:45 node4 containerd[17744]: time="2024-05-25T15:00:45.245678125+08:00" level=info msg="Connect containerd service"
May 25 15:00:45 node4 containerd[17744]: time="2024-05-25T15:00:45.245791893+08:00" level=warning msg="failed to load plugin io.containerd.grpc.v1.cri" error="failed to create CRI service: failed to find snapshotter \"overlayfs\""

这里说明系统不支持overlayfs

bash 复制代码
lsmod | grep overlay
overlay                91659  0 
bash 复制代码
  xfs_info /

从docker 官方文档上面来看

如果要修改xfs ftyoe 要修改设置,可是如果修改这个设计影响系统,所以暂时启动这个服务器

相关推荐
ggaofeng2 小时前
通过命令学习k8s
云原生·容器·kubernetes
death bell2 小时前
Docker基础概念
运维·docker·容器
想学习java初学者5 小时前
Docker Compose部署Kafka(非Zookeeper)
docker·容器·kafka
qq_道可道5 小时前
K8S升级到1.24后,切换运行时导致 dind 构建镜像慢根因定位与解决
云原生·容器·kubernetes
SONGW20186 小时前
k8s拓扑域 :topologyKey
kubernetes
weixin_438197387 小时前
K8S实现反向代理,负载均衡
linux·运维·服务器·nginx·kubernetes
郝同学的测开笔记8 小时前
云原生探索系列(十二):Go 语言接口详解
后端·云原生·go
mit6.8249 小时前
[Docker#5] 镜像仓库 | 命令 | 实验:搭建Nginx | 创建私有仓库
linux·后端·docker·云原生
牛右刀薛面9 小时前
麒麟V10,arm64,离线安装docker和docker-compose
运维·docker·容器·麒麟·鲲鹏
后端常规开发人员10 小时前
在 Mac 上使用 Docker 安装宝塔并部署 LNMP 环境
macos·docker·容器·宝塔