Kubernetes kubectl The connection to the server localhost:8080 was refused - did you specify the rig
一、问题
The connection to the server localhost:8080 was refused - did you specify the right host or port?
二、原因
kubectl命令需要使用kubernetes-admin来运行,但是从节点没有这个文件
三、解决方法
1. 主节点将其【/etc/kubernetes/admin.conf】文件拷贝到从节点相同目录下
scp /etc/kubernetes/admin.conf root@192.168.18.133:/etc/kubernetes
2.从节点配置环境变量
echo "export KUBECONFIG=/etc/kubernetes/admin.conf" >> ~/.bash_profile
3. 使该文件立即生效
source ~/.bash_profile
4. 接着再运行kubectl命令就OK了
参考:https://www.jianshu.com/p/6fa06b9bbf6a
Kubernetes kubectl The connection to the server localhost:8080 was refused - did you specify the rig相关推荐
- k8s重启导致node没有成功连接:The connection to the server localhost:8080 was refused - did you specify the righ
问题分析 环境变量 原因:kubernetes master没有与本机绑定,集群初始化的时候没有绑定,此时设置在本机的环境变量即可解决问题. 问题图片 解决方式 步骤一:设置环境变量 具体根据情况,此 ...
- The connection to the server master:6443 was refused - did you specify the right host or port?
The connection to the server master:6443 was refused - did you specify the right host or port? kuber ...
- 问题解决:The connection to the server xxxxx:6443 was refused - did you specify the right host or port?
具体排查过程是真的忘了,前后开关了十几个网页. 1.查看kubelet是否正常 systemctl status kubelet 2.kubelet未启动的情况,查看kubelet日志 journal ...
- 问题“The connection to the server....:6443 was refused - did you specify the right host or port?”的处理!
问题"The connection to the server <master>:6443 was refused - did you specify the right hos ...
- k8s-问题:[root@master log]# kubectl get node The connection to the server 192.168.0.105:6443 was refus
记一次测试虚拟机异常关机导致的问题 关于[root@master log]# kubectl get node The connection to the server 192.168.0.105:6 ...
- Connection to @localhost failed. [08001] Could not create connection to database server. Attempt
Connection to @localhost failed. [08001] Could not create connection to database server. Attempt 当我们 ...
- k8s The connection to the server 10.209.213.55:443 was refused - did you specify the right host or p
今天在Kubernetes的从节点上运行命令[kubectl]出现了如下错误 [root@p22650v /home/zhu/k8s]# kubectl create -f k8stranscod ...
- python3 mysql错误 pymysql.err.OperationalError: (2013, 'Lost connection to MySQL server during query')
pymysql错误: pymysql.err.OperationalError: (2013, 'Lost connection to MySQL server during query') pymy ...
- JAVA——[MySQLNonTransientConnectionException:Could not create connection to database server.]解决方案
问题描述 com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connecti ...
- stomp 连接错误: Whoops! Lost connection to http://localhost:8080/spring13/stomp 的解决方法
[0]README 1)本文旨在给出 stomp 连接错误: Whoops! Lost connection to http://localhost:8080/spring13/stomp 的解决方法 ...
最新文章
- AppBaseJs 类库 网上常用的javascript函数及其他js类库写的
- 算法与数据结构(希尔排序)
- intellij idea 2018 license 可用无废话
- 【CSS】自定义checkbox样式
- 龙芯完成.NET移植稳步推进生态建设
- [html] input上传图片怎样触发默认拍照功能?
- 需求分析——掌握和使用UML建模语言顺序图模型
- cad在布局怎么调比例_大神们都在用的9个CAD制图技巧,你会用几个?
- 计算机鼠标不灵活怎么办,电脑鼠标不灵敏怎么调 玩LOL鼠标经常失灵怎么办
- 60后即将退休的人,有多少存款就算富有了?
- 被“遗弃”的互联网老年人 | 畅言
- CSS基础——CSS复合选择器【学习笔记】
- Divide Groups(分组)(二分图染色)
- 智能陈桥五笔输入法 for linux,陈桥五笔输入法官方下载
- 《影响力》顺从心理学6个使人顺从的策略
- DSPE-PEG4-Mal分子式:C56H103N2O15P的分子量介绍
- deepin系统的安装与问题解决
- 快慢缓急总相宜|ONES 人物
- 笔记本CPU更换硅脂、液金散热对比测试
- 安排几款实用的内网穿透工具(加教程)