首页 > 其他分享 >【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?】

时间:2022-09-05 11:34:18浏览次数:60  
标签:right 8080 kubernetes etc did admin conf port

问题

k8s报错

$ kubectl get node

The connection to the server localhost:8080 was refused - did you specify the right host or port?

解决方法

将master节点中的 /etc/kubernetes/admin.conf 文件拷贝到node节点的相同目录下

sudo scp admin.conf 172.19.5.160:/etc/kubernetes/

进入worker节点,更改 admin.conf 权限

chmod 666 /etc/kubernetes/admin.conf

配置环境变量,使之生效

echo "export KUBECONFIG=/etc/kubernetes/admin.conf" >> ~/.bash_profile
source ~/.bash_profile

标签:right,8080,kubernetes,etc,did,admin,conf,port
From: https://www.cnblogs.com/LMFrank/p/16657519.html

相关文章

  • 35. SQL--right join:右连接
    1.前言sqlrightjoin和leftjoin是相对的,rightjoin将返回右表(table2)中的所有记录,即使左表(table1)中没有匹配的记录也是如此。当左表中没有匹配的记录时,rightjoin仍......
  • 查询文件的版本号Copyright信息
    查询文件的版本号Copyright信息目前找到的实用的方法有两种,一种是cmd中利用wmic的库,一种是C#中的GetVersionInfo()方法。CMD中获取:获取单个文件:遍历某文件夹下所有文......
  • P8080 题解
    题目传送门小学生又来写题解啦!你可能会认为,能够使用杯座人数的最大值,就是杯座数量。但结合样例一,若杯座数量大于总人数,只能输出总人数。下一个问题是如何计算杯座数量......
  • copyright
    Copyrightisatypeofintellectualproperty[IP]thatgivesitsownertheexclusiverighttomakecopiesofacreativework,usuallyforalimitedtime.Thec......
  • k8s集群不可用:The connection to the server 192.168.117.161:6443 was refused - did
    虚拟机非正常关机后,k8s集群不可用获取节点,报如下错,kubectlgetnode 查看env:env|grep-ikubernetes 查看docker状态:systemctlstatusdocker 查看kubelet......