Reborn� 2022-09-06 12:19 采纳率: 27.3%
浏览 55

k8s初始化失败的问题

k8s初始化失败,

[root@master k8s-init]# kubeadm init --config=kubeadm-init.yaml |tee master-init.log
W0906 12:14:51.459045   16254 common.go:84] your configuration file uses a deprecated API spec: "kubeadm.k8s.io/v1beta2". Please use 'kubeadm config migrate --old-config old.yaml --new-config new.yaml', which will write the new, similar spec using a newer API version.
W0906 12:14:51.460060   16254 common.go:84] your configuration file uses a deprecated API spec: "kubeadm.k8s.io/v1beta2". Please use 'kubeadm config migrate --old-config old.yaml --new-config new.yaml', which will write the new, similar spec using a newer API version.
W0906 12:14:51.461217   16254 initconfiguration.go:119] Usage of CRI endpoints without URL scheme is deprecated and can cause kubelet errors in the future. Automatically prepending scheme "unix" to the "criSocket" with value "/var/run/dockershim.sock". Please update your configuration!
[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="2022-09-06T12:14:51+08:00" level=fatal msg="unable to determine runtime API version: rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial unix /var/run/dockershim.sock: connect: no such file or directory\""
, 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

初始化yaml文件:

[root@master k8s-init]# cat kubeadm-init.yaml 
apiVersion: kubeadm.k8s.io/v1beta2
bootstrapTokens:
- groups:
  - system:bootstrappers:kubeadm:default-node-token
  token: abcdef.0123456789abcdef
  ttl: 24h0m0s
  usages:
  - signing
  - authentication
kind: InitConfiguration
localAPIEndpoint:
  advertiseAddress: 172.31.190.11
  bindPort: 6443
nodeRegistration:
  criSocket: /var/run/dockershim.sock
  name: master
  taints:
  - effect: NoSchedule
    key: node-role.kubernetes.io/master
---
apiServer:
  timeoutForControlPlane: 4m0s
apiVersion: kubeadm.k8s.io/v1beta2
certificatesDir: /etc/kubernetes/pki
clusterName: kubernetes
controllerManager: {}
dns:
  type: CoreDNS
etcd:
  local:
    dataDir: /var/lib/etcd
imageRepository: 172.28.31.40:5000
kind: ClusterConfiguration
kubernetesVersion: v1.25.0
networking:
  dnsDomain: cluster.local
  podSubnet: 10.244.0.0/16
  serviceSubnet: 10.254.0.0/16
scheduler: {}
---
apiVersion: kubeproxy.config.k8s.io/v1alpha1
kind: KubeProxyConfiguration
mode: ipvs



  • 写回答

2条回答

      报告相同问题?

      相关推荐 更多相似问题

      问题事件

      • 创建了问题 9月6日

      悬赏问题

      • ¥20 excel vba 入门 计算1-100的乘积
      • ¥15 关于网段,局域网,公共网络,私人网络
      • ¥15 C语言编程,输入数据后没有反应
      • ¥20 苹果app名字侵权商标,我投诉了,但是苹果一直没回怎么办
      • ¥15 Android studio运行不成功总是报错
      • ¥15 pycharm 加载软件包列表时出错connect timed out
      • ¥15 和您碰到了同一个问题
      • ¥15 如何在微信支付V3PHP版请求中添加header?
      • ¥15 在数字信号处理中用MATLAB显示波形。
      • ¥15 keil MDK软件进行仿真调试的局限