Kubernetes K8s 結合國內外文章解決 The kubelet is not running
cat > /etc/yum.repos.d/kubernetes.repo <<EOF [kubernetes] name=Kubernetes baseurl= enabled=1 gpgcheck=0 repo_gpgcheck=0 gpgkey= EOF
yum install -y --nogpgcheck kubelet kubeadm kubectl systemctl enable kubelet
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 [::1]:10248: connect: connection refused. [kubelet-check] It seems like the kubelet isn't running or healthy. .... This error is likely caused by: - The kubelet is not running - The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)
[root@k8s-master ~]# cd /etc/systemd/system/kubelet.service.d/ -bash: cd: /etc/systemd/system/kubelet.service.d/: 沒有那個檔案或目錄
kubeadm init \ --image-repository registry.aliyuncs.com/google_containers \ --kubernetes-version=v1.23.5 \ --pod-network-cidr=10.244.0.0/16 \ --service-cidr=10.96.0.0/12 \ --apiserver-advertise-address=192.168.0.2
journalctl -xeu kubelet | grep Failed
3月 18 20:21:04 k8s-master kubelet[36490]: E0318 20:21:04.954990 36490 server.go:302] "Failed to run kubelet" err="failed to run Kubelet: misconfiguration: kubelet cgroup driver: \"systemd\" is different from docker cgroup driver: \"cgroupfs\""
1 { 2 "registry-mirrors": ["https://你的加速地址.mirror.aliyuncs.com"], 3 "log-driver": "json-file", 4 "log-opts": { 5 "max-size": "10m", 6 "max-file": "1" 7 }, 【看這!這加個逗號,下面加這句,結尾沒有逗號】 8 "exec-opts": ["native.cgroupdriver=systemd"] 9 }
systemctl daemon-reload systemctl restart docker systemctl restart kubelet kubeadm reset #重置了沒事的,反正之前也起不來~ y systemctl status kubelet #初始就是啟動不了的 #驗證cgroupdriver 修改生效 (這兩行都是驗證的)看到systemd 就對了 docker info -f {{.CgroupDriver}} docker info | grep -i cgroup
kubeadm init \ --image-repository registry.aliyuncs.com/google_containers \ --kubernetes-version=v1.23.5 \ --pod-network-cidr=10.244.0.0/16 \ --service-cidr=10.96.0.0/12 \ --apiserver-advertise-address=192.168.0.2
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70003733/viewspace-2904610/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- kubernetes/k8s CRI分析-kubelet建立pod分析K8S
- kubernetes/k8s CRI分析-kubelet刪除pod分析K8S
- docker/kubernetes國內源/映象源解決方式Docker
- Kubernetes-22:kubelet 驅逐策略詳解
- Kubernetes:kubelet 原始碼分析之探針原始碼
- zabbix-server is not running 報錯解決Server
- 最佳化國內外檔案協作解決方案!
- ubuntu使用國內ustc映象安裝kubelet kubeadm kubectlUbuntu
- 結合Kubernetes解讀微服務的12要素微服務
- 解決Bilibili無法選中文章內容
- 解決GITLAB無法啟動runsv no runningGitlab
- 內外網同時連線解決
- 同時訪問內外網解決方案
- Kubernetes安裝之九:配置node節點之kubelet
- kubernetes實踐之五十:kubelet執行機制分析
- 關於內外網資料同步解決方案
- Kubernetes 遷移節點 Kubelet 資料儲存目錄
- 眾成翻譯-國外前端文章前端
- 國內Kubernetes安裝步驟
- 課內外結合進行送別詩的複習策略1
- 課內外結合進行送別詩的複習策略2
- 課內外結合進行送別詩的複習策略3
- 課內外結合進行送別詩的複習策略4
- 課內外結合進行送別詩的複習策略5
- kubernetes 原始碼安裝1.18.3 (8)授權 apiserver 訪問 kubelet原始碼APIServer
- Kubernetes K8S之儲存ConfigMap詳解K8S
- 解決 Github 國內訪問問題Github
- kubernetes(k8s)K8S
- Ubuntu 安裝 k8s 三駕馬車 kubelet kubeadm kubectlUbuntuK8S
- Vite 原始碼解讀系列(圖文結合) —— 外掛篇Vite原始碼
- 在kubernetes 叢集內訪問k8s API服務K8SAPI
- kubernetes1.9原始碼閱讀 kubelet對pod資源的wat原始碼
- 解決Flutter編譯一直顯示Running Gradle task 'assembleDebug'Flutter編譯Gradle
- Kubernetes1.5新特性(一):Kubelet API增加認證和授權能力API
- 記一次kubernetes叢集異常: kubelet連線apiserver超時APIServer
- 解決使用jedis連線是報DENIED Redis is running in protected mode錯誤Redis
- 行者APP適配國外環境問題解決APP
- 國內的 go get 問題的解決 --gopmGo