### --- 报错现象:localhost:8080 was refused
### --- 报错分析:# kubectl get po
The connection to the server localhost:8080 was refused - did you specify the right host or port?
### --- 解决方案:[root@k8s-master01 ~]# rm -f ~/.kube/config
[root@k8s-master01 ~]# cp /etc/kubernetes/admin.kubeconfig ~/.kube/config
报错处理二: ### --- 报错现象:apiserver无法启动[root@k8s-master01 ~]# kubectl create -f nginx-deploy.yaml
Error from server (InternalError):an error on the server ("") has prevented the request from succeeding
### --- OR
[root@k8s-master01 ~]# systemctl status kube-apiserver
● kube-apiserver.service - Kubernetes API ServerLoaded: loaded (/usr/lib/systemd/system/kube-apiserver.service; enabled; vendor preset: disabled)Active: inactive (dead) since Thu 2021-07-15 19:01:22 CST; 1min 22s agoDocs: : 1612 ExecStart=/usr/local/bin/kube-apiserver (code=exited, status=1/FAILURE)
### --- 报错分析:~~~ ——>因为apiserver的配置文件找不到
### --- 解决方案:~~~ ——>需要把apiserver的配置文件,从word中复制到notepad中,然后在复制到服务器上,
~~~ ——>之后执行systemctl daemon-reload && systemctl restart kube-apiserver
~~~ ——>其他组件类似报错一样
本文发布于:2024-01-28 04:52:07,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/17063887334917.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |