gpt4 book ai didi

kubernetes - kubelet 服务未启动

转载 作者:行者123 更新时间:2023-12-05 00:56:24 33 4
gpt4 key购买 nike

在运行 kubectl get nodes 等命令时出现以下错误:

与服务器 :6443 的连接被拒绝 - 您是否指定了正确的主机或端口?

我运行了 systemctl status kubelet.service 并收到以下状态:

root@k8s-l2bridge-ma:~# sudo systemctl status kubelet.service

● kubelet.service - kubelet: The Kubernetes Node Agent
Loaded: loaded (/lib/systemd/system/kubelet.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/kubelet.service.d
└─10-kubeadm.conf
Active: activating (auto-restart) (Result: exit-code) since Tue 2020-06-16 11:46:05 UTC; 9s ago
Docs: https://kubernetes.io/docs/home/
Process: 28012 ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS (code=exited, status=255)
Main PID: 28012 (code=exited, status=255)

Jun 16 11:46:05 k8s-l2bridge-ma systemd[1]: kubelet.service: Failed with result 'exit-code'.

如何排除故障并找出问题所在?我发现很少有线索谷歌搜索,但没有解决问题。

最佳答案

只需修改文件/etc/systemd/system/kubelet.service.d/10-kubeadm.conf

Environment="KUBELET_SYSTEM_PODS_ARGS=--pod-manifest-path=/etc/kubernetes/manifests --allow-privileged=true --fail-swap-on=false"

然后执行命令:

 $ systemctl daemon-reload

$ systemctl restart kubelet

看看:fail-kubelet-service , kubelet-failed-start .

关于kubernetes - kubelet 服务未启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62407918/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com