k8s进行与容器交互时报错:unable to upgrade connection: Unauthorized在k8s实现kubectl exec -it pod_ID sh出错解决
在创建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出错解决的更多相关文章
- tomcat启动后,页面浏览时报错 Unable to compile class for JSP的解决方案
		转:tomcat启动后,页面浏览时报错 Unable to compile class for JSP的解决方案 检查tomcat与web工程对应版本,tomcat中对应版本的jar包拷贝到web工程 ... 
- 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 ... 
- tomcat启动后,页面浏览时报错 Unable to compile class for JSP的解决方案【原创】
		问题描述: tomcat启动后,console正常,console中语句为: 信息: Server startup in 7291 ms 但浏览器访问首页面http://localhost:808 ... 
- uwp - 解决使用EntityFramework时报错“unable to load dll 'sqlite3':the specified module could not be found”
		在使用uwp的ef过程中碰到一万个问题快折腾死我了,好在最后终于解决掉所有问题,但愿如此,因为在这之前先后发生不同的报错,不知道后面还会碰到新的问题不. 其中一个问题是这样的,生成能正常生成,但是启动 ... 
- YII2 在使用控制器调试微信接口时报错 Unable to verify your data submission
		出现这个原因,是因为提交数据时,被YII2的CSRF验证给拦截了. 只需要在当前控制器设置一个属性,关闭该验证就可以了. public $enableCsrfValidation = false; 
- 使用git send-email发送邮件时报错: Unable to initialize SMTP properly怎么处理?
		答: 配置~/.gitconfig中的smtpserver 需往~/.gitconfig中添加如下内容: [sendemail] smtpserver = <stmp_server_name ... 
- 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( ... 
- 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 ... 
- 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 ... 
随机推荐
- 20180306-time&datetime模块
			在开始介绍时间模块之前先说明几点: 一. Python中常用以下几种形式表示时间 1.时间戳 2.格式化的时间字符串 3.元组(struct_time)(共九个元素),由于Python的time模块实 ... 
- FTP客户端遇到150连接超时错误的处理办法
			环境:阿里云ECS,win server 2012 R2 / FTP Server(FileZilla 0.9.41) 问题描述:账号连接正常,但无法列出目录,提示150连接超时. 解决过程: 1.关 ... 
- Sass-乘法
			Sass 中的乘法运算和前面介绍的加法与减法运算还略有不同.虽然他也能够支持多种单位(比如 em ,px , %),但当一个单位同时声明两个值时会有问题.比如下面的示例: 编译的时候报“20px*px ... 
- 【学习笔记】虚树复习记(BZOJ2286 SDOI2011 消耗战)
			想写战略游戏却想不起来虚树T^T 所以就有了这篇复习记QwQ ——简介!—— 我们在处理树上问题的时候,dfs是一个常用手段,但是我们发现,如果一棵树上只有一部分关键点,每次dfs需要访问好多不是关键 ... 
- HTTP协议缓存
			缓存的概念 缓存这个东西真的是无处不在, 有浏览器端的缓存, 有服务器端的缓存,有代理服务器的缓存, 有ASP.NET页面缓存,对象缓存. 数据库也有缓存, 等等. http中具有缓存功能的是浏览器缓 ... 
- IDEA使用Maven的第一个测试
			创建完成后,点击这个按钮.进行配置. 选择第二个就行了. 然后选择这个去配置tomcat. 
- 使用DMA方式发送串口数据
			一.初始化部分代码 //串口接收DMA缓存 uint8_t Uart_Rx[UART_RX_LEN] = {}; uint32_t Uart_Send_Buffer[] = {}; void USAR ... 
- 10.17 linux 文件权限
			文件权限模拟练习 [root@wen ~]# groupadd incahome[root@wen ~]# usersdd oldboy -g incahome-bash: usersdd: comm ... 
- C#读取csv、xls、sql数据库的实现
			using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Secu ... 
- hdu 5181 numbers——思路+区间DP
			题目:http://acm.hdu.edu.cn/showproblem.php?pid=5181 题解:https://www.cnblogs.com/Miracevin/p/10960717.ht ... 
