在创建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. elasticsearch 深入 —— Scroll滚动查询

    Scroll search 请求返回一个单一的结果"页",而 scroll API 可以被用来检索大量的结果(甚至所有的结果),就像在传统数据库中使用的游标 cursor. 滚动并 ...

  2. go语言从例子开始之Example39.使用函数自定义排序

    有时候我们想使用和集合的自然排序不同的方法对集合进行排序.例如,我们想按照字母的长度而不是首字母顺序对字符串排序.这里是一个 Go 自定义排序的例子. Example: package main im ...

  3. Cent OS 7 VNC 安装

    关闭防火墙 关闭selinux 挂载光盘到本地 #yum install tigervnc-server -y #cp /lib/systemd/system/vncserver@.service / ...

  4. update all line start with -- to space

    update all line start with -- to space ^--.*$

  5. 在IDEA中如何将Spring boot项目打包成可执行的jar包并发布到linux服务

    这两年微服务很流行,这里简单介绍一下如何将自己使用idea写的微服务打包成一个可执行的jar包,并发布到linux服务器的步骤.因为spring boot有内置的tomcat所以一般使用内置的tomc ...

  6. NotePad++安装compare插件(两个文件对比功能)

    首先百度搜索“notepad compare”,找到“Notepad++ Compare plugin download | SourceForge.net”,SourceForge提供了一个Comp ...

  7. solrJ 基本使用

    添加: PropertiesUtils pro = new PropertiesUtils();String path = pro.load("solr.properties", ...

  8. LOJ149 0/1分数规划

    竟然没有写过分数规划的题解 考前挣扎一发板子( 二分答案k 然后0/1分数规划的方法就是 分母乘过去然后贪心解决 注意实数二分的精度 一般估计一个次数比较好不然容易出现精度比较误差[惨痛教训 就做完了 ...

  9. MySQL不支持的特性

    MySQL 1.不支持物化视图. 2.不支持位图索引. 3.不支持并行查询. 4.不支持哈希关联,MySQL的所有关联都是嵌套循环关联.不过,可以通过建立一个哈希索引来曲线实现. 5.不允许对同一表同 ...

  10. linux查找一个文件的路径