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. 目标跟踪算法meanshift优缺点

    原博主:http://blog.csdn.net/carson2005/article/details/7341051 meanShift算法用于视频目标跟踪时,采用目标的颜色直方图作为搜索特征,通过 ...

  2. iOS中数组遍历的方法及比较

    数组遍历是编码中很常见的一种需求,我们来扒一拔iOS里面都有什么样的方法来实现,有什么特点. 因为ios是兼容C语言的,所以c语言里面的最最常见的for循环遍历是没有问题的. 本文中用的数组是获取的系 ...

  3. 用sublime server 启动本地服务器(手机访问电脑页面)

    安装sublime server 插件包           1.Ctrl + shift + p                      install package               ...

  4. Android Studio单独生成apk

    /********************************************************************* * Android Studio单独生成apk * 说明: ...

  5. MySQL基础(《MySQL必知必会》简单总结)

    使用MySQL # 选择数据库 USE database_name; # 显示数据库 SHOW DATABASES; # 显示当前数据库的表 SHOW TABLES; # 显示特定表有哪些列 SHOW ...

  6. [Python编程实战] 第一章 python的创建型设计模式1.1抽象工厂模式

    注:关乎对象的创建方式的设计模式就是“创建型设计模式”(creational design pattern) 1.1 抽象工厂模式 “抽象工厂模式”(Abstract Factory Pattern) ...

  7. Luogu 4149 Race

    Luogu 4149 Race 用点分治解决. 点分治在计算路径贡献时,为了不统计在一颗子树中的路径,解决方法一种是容斥,但在这种求最值问题中不便用容斥来撤销. 另一种则是,处理一颗子树时,只考虑前面 ...

  8. CF1114F Please, another Queries on Array?

    CF1114F Please, another Queries on Array? 考虑用线段树维护取模后的区间积和真正的区间积所含有的质因子. 每次询问查得这两个值后,一乘一除,即可算出该区间积的欧 ...

  9. BestCoder Round #1 第二题 项目管理

    // 第二题 我记得很久很久很久以前看过这样的题目,忘记是哪的区域赛了 // 记得有人说和节点度数有关,我记不清了,反正当时完全不懂 // 然后我想了想,估计就是更新节点度数有关,YY出来可能只要更新 ...

  10. spring 自动扫描组件

    在Spring2.5中,有4种类型的组件自动扫描注释类型 @Component – 指示自动扫描组件. @Repository – 表示在持久层DAO组件. @Service – 表示在业务层服务组件 ...