解决思路: kubectl 默认从 ~/.kube/config 配置文件获取访问 kube-apiserver 地址.证书.用户名等信息,如果没有配置该文件,或者该文件个别参数配置出错,执行命令时出错:The connection to the server localhost:8080 was refused - did you specify the right host or port? 解决办法: 1 查看该文件是否存在,若不存在则生成 2 查看该文件内容是否有缺,尤其是server字…
今天在Kubernetes的从节点上运行命令[kubectl]出现了如下错误: [root@k8snode1 kubernetes]# kubectl get pod The connection to the server localhost:8080 was refused - did you specify the right host or port? 出现这个问题的原因是kubectl命令需要使用kubernetes-admin来运行,解决方法如下,将主节点中的[/etc/kubern…
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/l…
did you run below commands after kubeadm init To start using your cluster, you need to run (as a regular user): sudo cp /etc/kubernetes/admin.conf $HOME/ sudo chown $(id -u):$(id -g) $HOME/admin.conf export KUBECONFIG=$HOME/admin.conf ref: https://gi…
不知道怎么用着用着,使用kubectl 时报错,错误如下: root@R740--:~# kubectl get pod The connection to the server 107.105.136.28: was refused - did you specify the right host or port? $systemctl status kubeletMar :: server1 kubelet[]: E0307 :: reflector.go:] k8s.io/kubernet…
首先是按照二进制方式安装的k8s. [root@ht22 calico]# cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) [root@ht22 calico]# uname -r 3.10.0-1160.45.1.el7.x…
k8s坑The connection to the server localhost:8080 was refused - did you specify the right host or port 2019年01月08日 17:21:06 金柱 阅读数:47 定义一个mysql的RC文件:mysql-rc.yaml apiVersion: v1 kind: ReplicationController metadata: name: mysql spec: replicas: 1 select…
因为启动dashboard报CrashLoopBackOff错误,尝试使用logs去查看日志,结果报错,错误如下: [root@localhost ~]# kubectl -s http://192.168.37.130:8080 logs kubernetes-dashboard-v1.4.0-vceyf --namespace=kube-system Using HTTP port: Using apiserver-host location: http://127.0.0.1:8080 C…
nginx一直报错, 2016/12/02 10:23:19 [error] 1472#0: *31 connect() failed (111: Connection refused)while connecting to upstream, client: 101.18.123.107, server: localhost 网上说是php相关的,但是我没有使用php. 我这边是因为远程服务器(client)要ping我的服务器,但是我的服务器禁用了ping,一直出错.允许ping即可.…
今天在使用Navicat连一个远程mysql时,总是提示连接不成功,提示Lost connection to MySQL server at 'reading initial communication packet 但mysql服务已经启动 百度查之,终于找到解决方法如下: 修改hosts.allow vi /etc/hosts.allow #加mysqld : ALL : ALLOW mysqld-max : ALL :ALLOW 再次连接,但又提示can't connect to mysq…