The connection to the server 127.0.0.1:6443 was refused - did you specify the right host or port? 报错

文章描述了在部署K3S集群过程中遇到的问题,即在agent端尝试连接到127.0.0.1:6443时被拒绝。解决方案包括从server端拷贝k3s.yaml配置文件到agent端,更新配置文件指定正确的服务器地址,并确保配置持久化生效。通过这些步骤,可以修复连接拒绝的错误。
摘要由CSDN通过智能技术生成

The connection to the server 127.0.0.1:6443 was refused - did you specify the right host or port? 报错解决

在部署K3S集群的过程中,部署完之后server端能够查看到在集群内的所有节点,如下图

 在agent端查看的时候,却画风一变,提示端口或者主机错误,如下图

root@gpu-2-3:/home/sutpc# kubectl get nodes
E0725 17:10:48.642284    3433 memcache.go:265] couldn't get current server API group list: Get "https://127.0.0.1:6443/api?timeout=32s": dial tcp 127.0.0.1:6443: connect: connection refused
E0725 17:10:48.645636    3433 memcache.go:265] couldn't get current server API group list: Get "https://127.0.0.1:6443/api?timeout=32s": dial tcp 127.0.0.1:6443: connect: connection refused
E0725 17:10:48.646647    3433 memcache.go:265] couldn't get current server API group list: Get "https://127.0.0.1:6443/api?timeout=32s&#
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值