Istio 运行错误 failed to update resource with server-side apply for obj 问题解决

Istio 环境

kubernetes version: v1.18.2
istio version: v1.10.0

运行之后 istio-operator 的日志就抛出下面错误,而且会一直重启

# kubectl get iop -A
NAMESPACE      NAME                          REVISION     STATUS   AGE
istio-system   iop-pro-cluster-8410-1-10-0   iop-1-10-0   ERROR    1h
# kubectl get pod -n istio-system
NAME                                         READY   STATUS    RESTARTS   AGE
istio-operator-iop-1-10-0-759f564df6-6rvbj   1/1     Running   19         1h
failed to update resource with server-side apply for obj ConfigMap/istio-system/istio-sidecar-injector-iop-1-10-0: 415: Unsupported Media Type
failed to update resource with server-side apply for obj MutatingWebhookConfiguration//istio-sidecar-injector-iop-1-10-0: 415: Unsupported Media Type
failed to update resource with server-side apply for obj Deployment/istio-system/istiod-iop-1-10-0: 415: Unsupported Media Type
failed to update resource with server-side apply for obj PodDisruptionBudget/istio-system/istiod-iop-1-10-0: 415: Unsupported Media Type
failed to update resource with server-side apply for obj HorizontalPodAutoscaler/istio-system/istiod-iop-1-10-0: 415: Unsupported Media Type
2021-08-31T09:42:12.369429Z info installer using server side apply to update obj: ServiceAccount/istio-system/istio-ingressgateway-service-account
2021-08-31T09:42:12.376827Z error installer failed to update resource with server-side apply for obj ServiceAccount/istio-system/istio-ingressgateway-service-account: 415: Unsupported Media Type
2021-08-31T09:42:12.382257Z info installer using server side apply to update obj: Deployment/istio-system/istio-ingressgateway
2021-08-31T09:42:12.384672Z error installer failed to update resource with server-side apply for obj Deployment/istio-system/istio-ingressgateway: 415: Unsupported Media Type
2021-08-31T09:42:12.385266Z info installer using server side apply to update obj: PodDisruptionBudget/istio-system/istio-ingressgateway
2021-08-31T09:42:12.386973Z error installer failed to update resource with server-side apply for obj PodDisruptionBudget/istio-system/istio-ingressgateway: 415: Unsupported Media Type
2021-08-31T09:42:12.387721Z info installer using server side apply to update obj: Role/istio-system/istio-ingressgateway-sds
2021-08-31T09:42:12.392418Z error installer failed to update resource with server-side apply for obj Role/istio-system/istio-ingressgateway-sds: 415: Unsupported Media Type
2021-08-31T09:42:12.393067Z info installer using server side apply to update obj: RoleBinding/istio-system/istio-ingressgateway-sds
2021-08-31T09:42:12.398916Z error installer failed to update resource with server-side apply for obj RoleBinding/istio-system/istio-ingressgateway-sds: 415: Unsupported Media Type
2021-08-31T09:42:12.401822Z info installer using server side apply to update obj: HorizontalPodAutoscaler/istio-system/istio-ingressgateway
2021-08-31T09:42:12.403878Z error installer failed to update resource with server-side apply for obj HorizontalPodAutoscaler/istio-system/istio-ingressgateway: 415: Unsupported Media Type
2021-08-31T09:42:12.404578Z info installer using server side apply to update obj: Service/istio-system/istio-ingressgateway
2021-08-31T09:42:12.405936Z error installer failed to update resource with server-side apply for obj Service/istio-system/istio-ingressgateway: 415: Unsupported Media Type
failed to update resource with server-side apply for obj Service/istio-system/istiod-iop-1-10-0: 415: Unsupported Media Type
✘ Ingress gateways encountered an error: failed to update resource with server-side apply for obj ServiceAccount/istio-system/istio-ingressgateway-service-account: 415: Unsupported Media Type
failed to update resource with server-side apply for obj Deployment/istio-system/istio-ingressgateway: 415: Unsupported Media Type
failed to update resource with server-side apply for obj PodDisruptionBudget/istio-system/istio-ingressgateway: 415: Unsupported Media Type
failed to update resource with server-side apply for obj Role/istio-system/istio-ingressgateway-sds: 415: Unsupported Media Type
failed to update resource with server-side apply for obj RoleBinding/istio-system/istio-ingressgateway-sds: 415: Unsupported Media Type
failed to update resource with server-side apply for obj HorizontalPodAutoscaler/istio-system/istio-ingressgateway: 415: Unsupported Media Type
failed to update resource with server-side apply for obj Service/istio-system/istio-ingressgateway: 415: Unsupported Media Type
2021-08-31T09:46:44.671636Z error klog error retrieving resource lock istio-system/istio-operator-lock-iop-1-10-0: etcdserver: request timed out

解决问题

仔细看就可以发现错误日志抛出的内容:failed to update resource with server-side apply for obj 服务端更新

搜索了一下 server side 找到 k8s 官方的文档:服务端更新
请添加图片描述
注意这句话,这个特新是可以禁用的。这里我就想到了 istio-operator 为什么会出现这个问题。
在使用 v1.18.2 版本的 k8s 时,我注意到所有的资源都添加了 managedfields 字段并且配置非常多,看着也比较麻烦。所以就使用 --feature-gates ServerSideApply=false 禁用了 managedfields

问题现在比较清晰了:由于使用 --feature-gates ServerSideApply=false 禁用 managedfields 导致 istio-operator 内部使用了 server side apply 而更新失败,修复的话就直接把这个参数从 api-server 的启动中去掉就可以了

如果是 kubeadm 部署的 k8s,kube-apiserver 配置在下面默认路径中或者更新参数

/etc/kubernetes/manifests/kube-apiserver.yaml

让 istio-operator 重启或者稍等 1 分钟左右

NAMESPACE      NAME                          REVISION     STATUS    AGE
istio-system   iop-pro-cluster-8410-1-10-0   iop-1-10-0   HEALTHY   2h

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/107719.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

JVM进阶(1)

一)JVM是如何运行的? 1)在程序运行前先将JAVA代码转化成字节码文件也就是class文件,JVM需要通过类加载器将字节码以一定的方式加载到JVM的内存运行时数据区,将类的信息打包分块填充在运行时数据区; 2)但是字节码文件是JVM的一套指…

高三高考免费试卷真题押题知识点合集

发表于安徽 温馨提示:有需要的真题试卷可联系本人,百卷内上免费资源。 感觉有用的下方三连,谢谢 ​ 。 免费版卷有6-60卷每卷平均4-30页 高三免费高三地理高三英语高三化学高三物理高三语文高三历史高三政治高三数学高三生物 付费版卷有1…

适用于 Mac 或 Windows 的 4 种最佳 JPEG/PNG图片 恢复软件

您的计算机或外部存储驱动器上很可能有大量 JPEG /PNG图片照片,但不知何故,您意识到一些重要的 JPEG /PNG图片文件丢失或被删除,它们对您来说意义重大,您想要找回它们. 4 种最佳 JPEG/PNG图片 恢复软件 要成功执行 JPEG /PNG图片…

面试题复盘-2023/10/20

目录 笔试题面试题(未完待续) 笔试题 一.多选题 A:map的key是const,不可更改 B:STL中的快速排序比一般的快速排序速度更快,是因为中值排序法 C:list的插入效率是O(1) D:vector的容量只能增大不能减小 解析: B: STL中的sort函数的…

父子项目打包发布至私仓库

父子项目打包发布至私仓库 1、方法一 在不需要发布至私仓的模块上添加如下代码&#xff1a; <plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-deploy-plugin</artifactId><configuration><skip>true</s…

SpringBoot内置工具类之断言Assert的使用与部分解析

先例举一个service的demo中用来验证参数对象的封装方法&#xff0c;使用了Assert工具类后是不是比普通的 if(xxx) { throw new RuntimeException(msg) } 看上去要简洁多了&#xff1f; 断言Assert工具类简介 断言是一个判断逻辑&#xff0c;用来检查不该发生的情况&#xff…

san.js源码解读之模版解析(parseTemplate)篇——readIdent函数

一、源码分析 /*** 读取ident* 这里的 ident 指标识符(identifier)&#xff0c;也就是通常意义上的变量名* 这里默认的变量名规则为&#xff1a;由美元符号($)、数字、字母或者下划线(_)构成的字符串** inner* param {Walker} walker 源码读取对象* return {string}*/ functio…

EtherNet Ip工业RFID读写器与欧姆龙PLC 配置示例说明

一、准备阶段 POE交换机欧姆龙PLC 支持EtherNet Ip协议CX-Programmer 9.5配置软件 二、配置读卡器 1、打开软件 2、选择网卡&#xff0c;如果多网卡的电脑请注意对应所接的网卡&#xff0c;网卡名一般为“Network adapter Realtek PCIe GBE Family” 3、点击“选择网卡”&…

IP地址与代理ip在网络安全中的关键作用

目录 前言 一、IP地址在网络安全中的作用 1、网络流量监视和分析 2、网络安全事件响应 3、网络安全检测和防御 二、代理IP在网络安全中的作用 1、流量过滤和清洗 2、匿名访问和保护隐私 3、实现全球化业务 三、IP地址和代理IP在网络安全中的应用案例 1、DDoS攻击 2…

AI新能量!FortiGate NGFW面向数据中心全面集成FortiGuard AI 安全服务

企业IT技术正在以惊人的速度发展&#xff0c;转型最大的领域之一是下一代防火墙&#xff08;NGFW&#xff09;市场。如今&#xff0c;混合云、多云、边缘等多种基础设施形态共存&#xff0c;已经成为大部分企业的常态&#xff0c;不断扩张的攻击面需要不同形态防火墙的安全防护…

Spring Security漏洞防护—HttpFirewall和 HTTPS

一、HttpFirewall Spring Security有几个领域&#xff0c;你所定义的 pattern 会针对传入的请求进行测试&#xff0c;以决定应该如何处理请求。这发生在 FilterChainProxy 决定请求应该通过哪个过滤链时&#xff0c;以及 FilterSecurityInterceptor 决定哪些安全约束适用于请求…

守牢底线——建行驻江门市分行纪检组举办2023年清廉合规大讲堂

为推动廉洁教育打通“最后一公里”&#xff0c;近日&#xff0c;建行驻江门市分行纪检组举办江门市分行2023年清廉合规大讲堂。 本次大讲堂邀请了检察院资深检察官专题讲授《金融从业人员易涉犯罪问题剖析及预防》&#xff0c;检察官结合一线办案经历&#xff0c;从防范化解金…

从零开始的LINUX(三)

bc&#xff1a;进行浮点数运算 uname&#xff1a;查看当前的操作系统 ctrlc&#xff1a;中止当前正在执行的程序 ctrld&#xff1a;退出xshell shutdown&#xff1a;关机 reboot&#xff1a;重启 shell外壳&#xff1a; 作用&#xff1a;1、命令解释&#xff08;将输入的程序…

039-第三代软件开发-PDF阅读器

第三代软件开发-PDF阅读器 文章目录 第三代软件开发-PDF阅读器项目介绍PDF阅读器1 初始化PDF view2 qml 中使用3 创建模块 关键字&#xff1a; Qt、 Qml、 pdf、 LTDev、 本地 项目介绍 欢迎来到我们的 QML & C 项目&#xff01;这个项目结合了 QML&#xff08;Qt Met…

【vue3】样式穿透、完整新特性、动态css、css-module

一、样式穿透 vue2里面使用 /deep/ vue3里面使用 :deep() :deep(.el-input__inner){background-color: red; }二、完整新特性 :slotted() //parent.vue <template><div><p>这是父级</p><span></span><A><p class"red"…

[每周一更]-(第69期):特殊及面试的GIT问题解析

整合代码使用过程的问题&#xff0c;以及面试遇到的细节&#xff0c;汇总一些常用命令的对比解释和对比&#xff1b; 1、fetch和pull区别 git fetch是将远程主机的最新内容拉到本地&#xff0c;用户在检查了以后决定是否合并到工作本机分支中。 git pull则是将远程主机的最新内…

【Docker】联合探讨Docker:容器化技术的革命性应用

前言 Docker 是一个开源的应用容器引擎&#xff0c;让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的Linux或Windows操作系统的机器上,也可以实现虚拟化,容器是完全使用沙箱机制,相互之间不会有任何接口。 &#x1f4d5;作者简介&#xff1a;热…

8.自定义组件布局和详解Context上下文

pages/index.vue layout布局运行在服务端 1、在项目的目录下新建layout文件夹&#xff0c;并新建一个blog.vue布局文件 2、在页面中的layout函数里&#xff0c;返回刚才新建布局文件的名字blog就可以使用了 export default {...layout (context) {console.log(context)retu…

ElasticSearch(ES)8.1及Kibana在docker环境下如何安装

ES基本信息介绍 Elasticsearch&#xff08;简称ES&#xff09;是一个开源的分布式搜索和分析引擎&#xff0c;最初由Elastic公司创建。它属于Elastic Stack&#xff08;ELK Stack&#xff09;的核心组件之一&#xff0c;用于实时地存储、检索和分析大量数据。 以下是Elastics…

37基于MATLAB平台的图像去噪,锐化,边缘检测,程序已调试通过,可直接运行。

基于MATLAB平台的图像去噪&#xff0c;锐化&#xff0c;边缘检测&#xff0c;程序已调试通过&#xff0c;可直接运行。 37matlab边缘检测图像处理 (xiaohongshu.com)