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

简介: 解决CentOS部署K3S环境8080端口异常

解决CentOS部署K3S环境8080端口异常

首先运行起来systemctl start k3s.service 不然不存在/etc/rancher/k3s/k3s.yaml
运行起来后编辑文件设置
     vim /etc/profile
     在底部增加新的环境变量 export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
     或者是
     echo "export KUBECONFIG=/etc/rancher/k3s/k3s.yaml" >> /etc/profile
使生效
  source /etc/profile

目录
打赏
0
0
0
0
31
分享
相关文章
ssh: connect to host github.com port 22: Connection refused
本文讨论了在使用Git命令操作GitHub时遇到的"ssh: connect to host github.com port 22: Connection refused"错误,分析了可能的原因,并提供了使用443端口或https协议作为解决方案,最终确定问题是由于DNS解析错误导致,通过修改hosts文件解决。
ssh: connect to host github.com port 22: Connection refused
启动mysql时的异常为:[ERROR] Can‘t start server: Bind on TCP/IP port. Got error: 98: Address already in used
启动mysql时的异常为:[ERROR] Can‘t start server: Bind on TCP/IP port. Got error: 98: Address already in used
阿里云Could not connect to SITP host: smtp.163.com,port: 25;
阿里云Could not connect to SITP host: smtp.163.com,port: 25;
345 1
[m1pro ] ssh: connect to host localhost port 22: Connection refused
[m1pro ] ssh: connect to host localhost port 22: Connection refused
106 1
【MySQL8】1130 - Host *** is not allowed to connect to this MySOL server
【MySQL8】1130 - Host *** is not allowed to connect to this MySOL server
The Tomcat connector configured to listen on port 10000 failed to start. The port may already be in
The Tomcat connector configured to listen on port 10000 failed to start. The port may already be in
mysql远程连接 Host * is not allowed to connect to this MySQL server
mysql远程连接 Host * is not allowed to connect to this MySQL server
92 0
kubectl命令报错:Unable to connect to the server: dial tcp XXX:16443: connect: no route to host
kubectl命令报错:Unable to connect to the server: dial tcp XXX:16443: connect: no route to host
1241 0
使用frp时遇到的问题connect: connection refuseddial tcp xxxx:7000: connect: connection refused
最近在做的项目需要用到frp来做代理连接本地内网机,卡在最后启动客户端的时候,提示报错:login to server failed: dial tcp xxxx:7000: connect: connection refuseddial tcp xxxx:7000: connect: connection refused!!找了很多尝试的办法,现在给大家列一下希望对大家有帮助。
3975 0
The Tomcat connector configured to listen on port 18081 failed to start. The port may already be in
The Tomcat connector configured to listen on port 18081 failed to start. The port may already be in
253 0