k8s节点执行master命令报错 localhost:8080 was refused
首先是按照二进制方式安装的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.x86_64
[root@ht22 calico]# docker -v
Docker version 18.03.0-ce, build 0520e24
在节点上执行命令 kubectl get pod, 出现错误
[root@ht22 network-scripts]# kubectl get pod
The connection to the server localhost:8080 was refused - did you specify the right host or port?
[root@ht22 network-scripts]# vi /etc/kubernetes/conf/bootstrap.kubeconfig
server: https://127.0.0.1:6443 改成master地址 : 10.128.1.156
[root@ht22 network-scripts]# rm -rf kubelet.kubeconfig
[root@ht22 network-scripts]# systemctl restart kubelet //重新生成 kubelet.kubeconfig
[root@ht22 calico]# echo "export KUBECONFIG=/etc/kubernetes/conf/kubelet.kubeconfig" >> /etc/profile
[root@ht22 calico]# source /etc/profile
修复之后出现结果:
[root@ht22 calico]# kubectl get nodes
NAME STATUS ROLES AGE VERSION
ht10.node NotReady,SchedulingDisabled k8s-node 82d v1.10.13
ht11.node Ready,SchedulingDisabled k8s-node 79d v1.10.13
ht12.node Ready,SchedulingDisabled k8s-node 79d v1.10.13
ht13.node Ready,SchedulingDisabled k8s-node 80d v1.10.13
ht2.node Ready,SchedulingDisabled k8s-node 99d v1.10.13
ht20.node Ready,SchedulingDisabled k8s-node 29d v1.10.13
ht22.node Ready,SchedulingDisabled k8s-node 23h v1.10.13
k8s节点执行master命令报错 localhost:8080 was refused的更多相关文章
- Python3安装Celery模块后执行Celery命令报错
1 Python3安装Celery模块后执行Celery命令报错 pip3 install celery # 安装正常,但是执行celery 命令的时候提示没有_ssl模块什么的 手动在Python解 ...
- 使用二进制方式安装K8S时使用kubectl命令报错:The connection to the server localhost:8080 was refused - did you specify the right host or port?
解决思路: kubectl 默认从 ~/.kube/config 配置文件获取访问 kube-apiserver 地址.证书.用户名等信息,如果没有配置该文件,或者该文件个别参数配置出错,执行命令时出 ...
- hbase shell中执行list命令报错:ERROR: org.apache.hadoop.hbase.PleaseHoldException: Master is initializing
问题描述: 今天在测试环境中,搭建hbase环境,执行list命令之后,报错: hbase(main):001:0> list TABLE ERROR: org.apache.hadoop.hb ...
- 安装atlas后执行hive命令报错
在集群中安装atlas,在安装atlas的节点上执行hive -e "show databases;" 正常,但是在集群中其他节点上执行hive -e "show dat ...
- 关于ubuntu上执行错误命令报错
Sorry, command-not-found has crashed! 新安装了一台ubuntu server 安装时用中文安装的,之后命令行下各种乱码,最后也不知道是修改哪里造成的 每次执行一次 ...
- Jenkins中执行docker命令报错
Cannot connect to the Docker daemon. Is the docker daemon running on this host? 在配置Jenkins从Gitlab自 ...
- 执行 maven 命令 报错Unable to add module to the current project as it is not of packaging type 'pom'[转]
今天学习在本地搭建Maven工程时,执行了mvn archetype:generate 命令,报错. Unable to create project from archetype [org.apac ...
- 执行yum命令报错"Unable to connect to Registration Management Service"
问题描述 linux上执行yum相关命令时,报无法连接到注册管理服务的错误,具体报错信息如下 [root@aijihe-core-zy-2-3 ~]# yum install gcc Loaded p ...
- 执行openstack命令报错【You must provide a username via either -...】
openstack环境搭建好后,openstack的服务都启动了,当执行openstack命令时如nova service list报如下错误 You must provide a username ...
随机推荐
- 36 异常机制 自定义异常 实际应用中的经验总结 尽量添加finally语句块去释放占用的资源
自定义异常 概念 使用Java内置的异常可以描述在编辑时出现的大部分异常情况.除此之外,用户还可以自定义异常.用户自定义异常类,只需继承Exception类即可. 在程序中使用自定义异常类,大体可分为 ...
- ArcGIS进行视域分析及地形图制作
问题说明 开发商要在本区域建造观景亭,希望在观景亭上能看到优美的景色.根据提供的数据,完成以下要求. 一. 数据说明(见"题目3"文件夹) 1. DEM.tif:研究区域的数据高 ...
- setState同步异步场景
setState同步异步场景 React通过this.state来访问state,通过this.setState()方法来更新state,当this.setState()方法被调用的时候,React会 ...
- logging 日志模块 configparser 配置文件
logging 模块 (copy博客) 详情浏览:http://www.cnblogs.com/linhaifeng/articles/6384466.html#_label12 函数式简单配置 im ...
- 前端知识之html基础
前端知识之html内容 web服务本质 浏览器发送请求-->http协议-->服务端接收请求-->服务端返回响应-->服务端把html文件内容发给浏览器-->浏览器渲染页 ...
- 《浅谈产品》——加油APP的平台是如何做的
最近油价又上涨了,我们平常去加油站加油用到"某滴加油"."某团加油"这些APP,一般情况下加200的油,各种优惠下来,最终只需要付170左右就可以了,基本是优惠 ...
- vue&uniapp环境搭建以及项目创建(webstorm)
以下是针对webstorm用户上手uniapp框架的学习 vue环境搭建以及配置(脚手架搭建) 首先要明确三样东西 npm:node.js的包管理器 webpack:主要用途是通过CommonJS 的 ...
- 『忘了再学』Shell基础 — 4、Bash基本功能(history命令)
目录 1.history历史命令 2.设置命令历史记录的条数 3.清空历史命令 4.历史命令的调用 5.命令与文件的补全 在Linux系统中默认的Shell就是Bourne-AgainShell(简称 ...
- 【freertos】005-启动调度器分析
前言 本节主要讲解启动调度器. 这些都是与硬件相关,所以会分两条线走:posix和cortex m3. 原文:李柱明博客:https://www.cnblogs.com/lizhuming/p/160 ...
- Linux部署Nacos
此处演示Nacos在Linux(CentOS7)环境中单机版部署,此处演示1.3.0版本. 一.官网下载压缩包 https://github.com/alibaba/nacos/releases 二. ...