1   主要是运行这个命令  alias kubectl='kubectl --kubeconfig=/etc/kubernetes/kubelet.conf'问题解决。

同时也用到如下命令:

  • passwd kubeusr          # 改kubeusr的密码
  • 当在终端执行sudo命令时,系统提示“luckchengis not in the sudoers file”:

    其实就是没有权限进行sudo,解决方法如下(这里假设用户名是luckcheng):

    1.切换到超级用户:$ su
    2.打开/etc/sudoers文件:$vi /etc/sudoers
    3.修改文件内容:
      找到“root ALL=(ALL) ALL”一行,在下面插入新的一行,
      内容是“luckcheng ALL=(ALL) ALL”,然后在vi键入命令“wq!”保存并退出。

  • chmod -R 777 *

kubectl get pods The connection to the server was refused - did you specify the rig的更多相关文章

  1. Kubernetes-kubectl The connection to the server localhost:8080 was refused -did you specify

    今天在Kubernetes的从节点上运行命令[kubectl]出现了如下错误: [root@k8snode1 kubernetes]# kubectl get pod The connection t ...

  2. 使用二进制方式安装K8S时使用kubectl命令报错:The connection to the server localhost:8080 was refused - did you specify the right host or port?

    解决思路: kubectl 默认从 ~/.kube/config 配置文件获取访问 kube-apiserver 地址.证书.用户名等信息,如果没有配置该文件,或者该文件个别参数配置出错,执行命令时出 ...

  3. 【Kubernetes】The connection to the server <master>:6443 was refused - did you specify the right host or port?

    不知道怎么用着用着,使用kubectl 时报错,错误如下: root@R740--:~# kubectl get pod The connection to the server 107.105.13 ...

  4. K8s - 解决主机重启后kubelet无法自动启动问题 错误:The connection to the server 192.168.60.128:6443 was refused - did you specify the right host or port?

    1,问题描述 (1)在安装配置好 Kubernetes 后,正常情况下服务器关机重启,kubelet 也会自动启动的.但最近配置的一台服务器重启后,输入命令 kubectl get nodes 查看节 ...

  5. 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? 解决 ...

  6. k8s遇坑:The connection to the server k8s-api.virtual.local:6443 was refused - did you specify the right host or port?

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

  7. Data source rejected establishment of connection, message from server: "Too many connections"解决办法

    异常名称 //数据源拒绝从服务器建立连接.消息:"连接太多" com.MySQL.jdbc.exceptions.jdbc4.MySQLNonTransientConnection ...

  8. MySQL远程连接丢失问题解决方法Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0

    最近远程连接mysql总是提示 Lost connection 很明显这是连接初始化阶段就丢失了连接的错误 其实问题很简单,都是MySQL的配置文件默认没有为远程连接配置好,只需要更改下MySQL的配 ...

  9. 虚拟机中MySQL连接问题:Lost connection to MySQL server at 'reading initial communication packet, system error: 0 以及 host is not allowed to connect mysql

    环境:在VirtualBox中安装了Ubuntu虚拟机,网络使用了NAT模式,开启了端口转发. 局域网内其他计算机访问虚拟机中的MySQL Server出现两个问题: Lost connection ...

随机推荐

  1. 控制图片在latex中的位置

    如何做到自己控制图片在latex中的位置? 方法:在 \begin{figure} 后面加参数 [h!] 即 \begin{figure}[h!] % Requires \usepackage{gra ...

  2. jsp页面图片显示不出来

    jsp页面就是MyJsp.jsp <body> This is my JSP page. <br> <img src="img/top.jpg"> ...

  3. 初识jQuery(2)

    1.DOM模型 1.1以对象描述文档的方式就是DOM 节点对象就是被称为DOM对象(标签对象) 1.2节点 元素节点(标签) 文本节点(标签内容) 属性节点(标签属性) 2.Jquery语法结构 $( ...

  4. jauery-layer弹出框的使用

    一布局: <div id="detailLayer"> <div class="box-header"> <div class=& ...

  5. python基础第一章

    Python基础 第一个python程序 变量 程序交互 基本数据类型 格式化输出 基本运算符 流程控制if...else... 流程控制-循环 第一个python程序 文件执行 1.用notepad ...

  6. I.MX6 修改调试串口号(ttymx0 -> ttymxc2)

    I.MX6 修改调试串口号(ttymx0 -> ttymxc2) 一.参考文章: uboot修改默认调试串口ttymxc0 ->ttymxc4(imx53) http://www.xueb ...

  7. 【剑指offer】08二叉树的下一个节点,C++实现

    原创博文,转载请注明出处! # 题目 父节点指向子节点的指针用实线表示,从子节点指向父节点的指针用虚线表示. # 思路 如果节点有右子节点,则右子节点的最左节点是该节点的下一个节点.例如,寻找b的下一 ...

  8. 添加dom节点及优化

    创建并添加dom加点如何进行优化? 1.使用文档片(DocumentFragment) 可以理解为"仓库",用来保存将来可能会添加到DOM中的节点: var fragment = ...

  9. Error measure

    Noise 在x和y都可能有noise 对于没有noise的情况,x~P(x), f(x)=h(x),但是如果现在有noise,x~P(x), y~P(y|x)(y是真正的label,只是一定概率上会 ...

  10. Codeforces 954H Path Counting 【DP计数】*

    Codeforces 954H Path Counting LINK 题目大意:给你一棵n层的树,第i层的每个节点有a[i]个儿子节点,然后问你树上的简单路径中长度在1~n*2-2之间的每个有多少条 ...