报错信息

  • 初始化命令
kubeadm init --image-repository registry.aliyuncs.com/google_containers
  • 初始化报错
[kubelet-check] Initial timeout of 40s passed.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp [::1]:10248: connect: connection refused.
  • 紧接着再次尝试初始化
error execution phase wait-control-plane: couldn't initialize a Kubernetes cluster
To see the stack trace of this error execute with --v=5 or higher

系统版本

名称版本
oscentos7.9_2009
kubeadm1.23.5-0
kubectl1.23.5-0
kubelet1.23.5-0

解决办法

  • 关闭swap交换分区
swapoff -a
  • 重置k8s,再重新初始化
kubeadm reset
kubeadm init --image-repository registry.aliyuncs.com/google_containers
Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐