@[TOC]
报错信息
- 初始化命令
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
系统版本
名称 | 版本 |
---|---|
os | centos7.9_2009 |
kubeadm | 1.23.5-0 |
kubectl | 1.23.5-0 |
kubelet | 1.23.5-0 |
解决办法
- 关闭swap交换分区
swapoff -a
- 重置k8s,再重新初始化
kubeadm reset
kubeadm init --image-repository registry.aliyuncs.com/google_containers