在创建pod时,进入pod失败

kubectl exec -it nginx-deployment-d55b94fd-xcrtg sh

error
检查问题,一直找不到答案,通过logs发现,同样不能实现
在这里插入图片描述
查其原因,是kubelet的配置问题,这里修改node节点的kubelet.json配置,
在node中分别修改

vi /opt/kubernetes/cfg/kubelet.config
------------------在文件末尾添加,认证确认
authentication:
  anonymous:
    enabled: true
----------------
# 然后重启kubelet
systemctl restart kubelet

在master节点上,添加认证用户,直接使用下列命令实现

kubectl create clusterrolebinding system:anonymous --clusterrole=cluster-admin --user=system:anonymous

重新实现,发现可以啦,进入pod完美。

k8s进行与容器交互时报错:unable to upgrade connection: Unauthorized在k8s实现kubectl exec -it pod_ID sh出错解决的更多相关文章

  1. tomcat启动后,页面浏览时报错 Unable to compile class for JSP的解决方案

    转:tomcat启动后,页面浏览时报错 Unable to compile class for JSP的解决方案 检查tomcat与web工程对应版本,tomcat中对应版本的jar包拷贝到web工程 ...

  2. netserver启动时报错 "Unable to start netserver with 'IN(6)ADDR_ANY' port '12865' and family AF_UNSPEC'"

    netperf启动netserver时报错 "Unable to start netserver with 'IN(6)ADDR_ANY' port '12865' and family A ...

  3. tomcat启动后,页面浏览时报错 Unable to compile class for JSP的解决方案【原创】

    问题描述: tomcat启动后,console正常,console中语句为: 信息: Server startup in 7291 ms   但浏览器访问首页面http://localhost:808 ...

  4. uwp - 解决使用EntityFramework时报错“unable to load dll 'sqlite3':the specified module could not be found”

    在使用uwp的ef过程中碰到一万个问题快折腾死我了,好在最后终于解决掉所有问题,但愿如此,因为在这之前先后发生不同的报错,不知道后面还会碰到新的问题不. 其中一个问题是这样的,生成能正常生成,但是启动 ...

  5. YII2 在使用控制器调试微信接口时报错 Unable to verify your data submission

    出现这个原因,是因为提交数据时,被YII2的CSRF验证给拦截了. 只需要在当前控制器设置一个属性,关闭该验证就可以了. public $enableCsrfValidation = false;

  6. 使用git send-email发送邮件时报错: Unable to initialize SMTP properly怎么处理?

    答: 配置~/.gitconfig中的smtpserver   需往~/.gitconfig中添加如下内容: [sendemail] smtpserver = <stmp_server_name ...

  7. python下载时报错 Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time

    def downloadXml(isExists,filedir,filename): if not isExists: os.mkdir(filedir) local = os.path.join( ...

  8. RobotFramework+Appium 升级Appium v1.10.0后,执行click element时报错:InvalidSelectorException: Message: Locator Strategy 'css selector' is not supported for this session,解决办法

    报错信息如下: debug] [35m[XCUITest][39m Connection to WDA timed out[debug] [35m[XCUITest][39m Connection t ...

  9. kali linux更新msf 报错Unable to find a spec satisfying metasploit-framework (>= 0) in the set. Perhaps the解决办法

    首先换更新源 :vim  /etc/apt/sources.list deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free co ...

随机推荐

  1. linux100day(day5)--编程原理和shell脚本

    通过前面的学习,我们对于linux文件系统有了一定的了解,我们接下来会初步接触编程原理和尝试编写shell脚本来实现功能. day05--编程原理和shell脚本初步认识 编程原理 在早期编程中,因为 ...

  2. 01.基础架构:一条SQL查询语句是如何执行的?学习记录

    01.基础架构:一条SQL查询语句是如何执行的?学习记录http://naotu.baidu.com/file/1c8fb5a0f2497c3a2655fed89099cb96?token=ff25d ...

  3. Sass函数:值列表函数length

    length() 函数主要用来返回一个列表中有几个值,简单点说就是返回列表清单中有多少个值: >> length(10px) 1 >> length(10px 20px (bo ...

  4. java使用对象类型作为方法的参数

  5. Flutter-ListView

    return Container( child: ListView( children: <Widget>[ Column( children: <Widget>[ Conta ...

  6. 全球的IPv6部署急剧增加,但中国几乎没有一个地方部署?

    全球的IPv6部署继续增加,但中国在IPv6方面还需要努力,从部署图上分析,中国几乎没有几个地方是普及IPv6的.这6年来,自世界IPv6发布以来,全球网络和服务提供商的IPv6部署水平急剧增加.如图 ...

  7. python代码整体左移或右移

    IDE 是  PyCharm 选中代码块: 1)右移:直接 Tab 2)左移:Shift + Tab

  8. 编写mapreduce的程序的套路

    https://blog.csdn.net/qq_42881421/article/details/83543926 给出下面6个经典案例: http://www.cnblogs.com/xia520 ...

  9. ubuntu下安装pyaudio

    首先安装依赖库,不安装依赖库会安装失败: sudo apt-get install libasound-dev portaudio19-dev libportaudio2 libportaudiocp ...

  10. springboot 加载jsp 刷新jsp ,刷新Controller (亲自尝试)

    解决jsp加载成功.<dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId&g ...