The connection to the server localhost:8080 was refused - did you specify the right host or port?
解决方法:kube-apiserver启动失败,重启即可!!!
[root@master ~]# systemctl status kube-apiserver
● kube-apiserver.service - Kubernetes API Server
Loaded: loaded (/usr/lib/systemd/system/kube-apiserver.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Mon 2019-03-18 14:55:11 CST; 9min ago
Docs: https://github.com/kubernetes/kubernetes
Process: 6446 ExecStart=/opt/kubernetes/bin/kube-apiserver $KUBE_APISERVER_OPTS (code=exited, status=1/FAILURE)
Main PID: 6446 (code=exited, status=1/FAILURE)
Mar 18 14:55:11 localhost.localdomain kube-apiserver[6446]: --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
Mar 18 14:55:11 localhost.localdomain kube-apiserver[6446]: --watch-cache Enable watch caching in the apiserver (default true)
Mar 18 14:55:11 localhost.localdomain kube-apiserver[6446]: --watch-cache-sizes strings List of watch cache sizes for every resource (pods, nodes, etc.), comma sepa...ber. It take
Mar 18 14:55:11 localhost.localdomain kube-apiserver[6446]: error: failed to create listener: failed to listen on 192.168.247.211:6443: listen tcp 192.168.247.211:6443: bind: cannot assign requested address
Mar 18 14:55:11 master systemd[1]: kube-apiserver.service holdoff time over, scheduling restart.
Mar 18 14:55:11 master systemd[1]: Stopped Kubernetes API Server.
Mar 18 14:55:11 master systemd[1]: start request repeated too quickly for kube-apiserver.service
Mar 18 14:55:11 master systemd[1]: Failed to start Kubernetes API Server.
Mar 18 14:55:11 master systemd[1]: Unit kube-apiserver.service entered failed state.
Mar 18 14:55:11 master systemd[1]: kube-apiserver.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
[root@master ~]# systemctl start kube-apiserver
相关文章
- 如何排查:The connection to the server ip:6443 was refused - did you specify the right host or port
- k8s The connection to the server localhost:8080 was refused - did you specify the right host or port?
- The connection to the server localhost:8080 was refused - did you specify the right host or port?
- K8s - 解决主机重启后kubelet无法自动启动问题 错误:The connection to the server 192.168.60.128:6443 was refused - did you specify the right host or port?
- 使用二进制方式安装K8S时使用kubectl命令报错:The connection to the server localhost:8080 was refused - did you specify the right host or port?