由于 istio-sidecar 注入,Kubernetes 部署失败

2024-04-22

我们的 K8 集群工作了一年多,最近它出现了一些奇怪的行为,现在当我们使用kubectl apply -f deployment-manifest.yaml,它没有显示在kubectl get pods。但显示在kubectl get deployments with 0/3 state. kubectl describe deployment app-deployment

Conditions:
  Type             Status  Reason
  ----             ------  ------
  Available        False   MinimumReplicasUnavailable
  ReplicaFailure   True    FailedCreate
  Progressing      False   ProgressDeadlineExceeded

当我检查时kube-apiserver logs

I1115 12:55:56.110277       1 trace.go:116] Trace[16922026]: "Call validating webhook" configuration:istiod-istio-system,webhook:validation.istio.io,resource:networking.istio.io/v1alpha3, Resource=gateways,subresource:,operation:CREATE,UID:00c425da-6475-4ed3-bc25-5a81d866baf2 (started: 2021-11-15 12:55:26.109897413 +0000 UTC m=+8229.935658158) (total time: 30.00030708s):
Trace[16922026]: [30.00030708s] [30.00030708s] END
W1115 12:55:56.110327       1 dispatcher.go:128] Failed calling webhook, failing open validation.istio.io: failed calling webhook "validation.istio.io": Post https://istiod.istio-system.svc:443/validate?timeout=30s: dial tcp 10.233.30.109:443: i/o timeout
E1115 12:55:56.110363       1 dispatcher.go:129] failed calling webhook "validation.istio.io": Post https://istiod.istio-system.svc:443/validate?timeout=30s: dial tcp 10.233.30.109:443: i/o timeout
I1115 12:55:56.121271       1 trace.go:116] Trace[576910507]: "Create" url:/apis/networking.istio.io/v1alpha3/namespaces/istio-system/gateways,user-agent:pilot-discovery/v0.0.0 (linux/amd64) kubernetes/$Format,client:192.168.1.16 (started: 2021-11-15 12:55:26.108861126 +0000 UTC m=+8229.934621868) (total time: 30.012357263s):

Kube 控制器日志

I1116 07:55:06.218995       1 event.go:278] Event(v1.ObjectReference{Kind:"ReplicaSet", Namespace:"default", Name:"ops-executor-app-6647b7cbdb", UID:"0ef5fefd-88d7-480f-8a5d-f7e2c8025ae9", APIVersion:"apps/v1", ResourceVersion:"122334057", FieldPath:""}): type: 'Warning' reason: 'FailedCreate' Error creating: Internal error occurred: failed calling webhook "sidecar-injector.istio.io": Post https://istiod.istio-system.svc:443/inject?timeout=30s: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
E1116 07:56:12.342407       1 replica_set.go:535] sync "default/app-6769f4cb97" failed with Internal error occurred: failed calling webhook "sidecar-injector.istio.io": Post https://istiod.istio-system.svc:443/inject?timeout=30s: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

当我检查时kubectl get pods -n istio-system

NAME                                    READY   STATUS    RESTARTS   AGE
istio-egressgateway-794d6f956b-8p5vz    0/1     Running   5          401d
istio-ingressgateway-784f857457-2fz4v   0/1     Running   5          401d
istiod-67c86464b4-vjp4j                 1/1     Running   5          401d

出口和入口网关日志有

2021-11-15T16:55:31.419880Z error   citadelclient   Failed to create certificate: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp: lookup istiod.istio-system.svc on 169.254.25.10:53: no such host"
2021-11-15T16:55:31.419912Z error   cache   resource:default request:37d26b55-df29-465f-9069-9b9a1904e8ab CSR retrial timed out: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp: lookup istiod.istio-system.svc on 169.254.25.10:53: no such host"
2021-11-15T16:55:31.419956Z error   cache   resource:default failed to generate secret for proxy: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp: lookup istiod.istio-system.svc on 169.254.25.10:53: no such host"
2021-11-15T16:55:31.419981Z error   sds resource:default Close connection. Failed to get secret for proxy "router~10.233.70.87~istio-egressgateway-794d6f956b-8p5vz.istio-system~istio-system.svc.cluster.local" from secret cache: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp: lookup istiod.istio-system.svc on 169.254.25.10:53: no such host"
2021-11-15T16:55:31.420070Z info    sds resource:default connection is terminated: rpc error: code = Canceled desc = context canceled
2021-11-15T16:55:31.420336Z warning envoy config    StreamSecrets gRPC config stream closed: 14, connection error: desc = "transport: Error while dialing dial tcp: lookup istiod.istio-system.svc on 169.254.25.10:53: no such host"
2021-11-15T16:55:48.020242Z warning envoy config    StreamAggregatedResources gRPC config stream closed: 14, no healthy upstream
2021-11-15T16:55:48.020479Z warning envoy config    Unable to establish new stream
2021-11-15T16:55:51.025327Z info    sds resource:default new connection
2021-11-15T16:55:51.025597Z info    sds Skipping waiting for gateway secret

尝试获取描述的详细信息here http://2021-11-15T16:55:31.419880Z%09error%09citadelclient%09Failed%20to%20create%20certificate:%20rpc%20error:%20code%20=%20Unavailable%20desc%20=%20connection%20error:%20desc%20=%20%22transport:%20Error%20while%20dialing%20dial%20tcp:%20lookup%20istiod.istio-system.svc%20on%20169.254.25.10:53:%20no%20such%20host%22%202021-11-15T16:55:31.419912Z%09error%09cache%09resource:default%20request:37d26b55-df29-465f-9069-9b9a1904e8ab%20CSR%20retrial%20timed%20out:%20rpc%20error:%20code%20=%20Unavailable%20desc%20=%20connection%20error:%20desc%20=%20%22transport:%20Error%20while%20dialing%20dial%20tcp:%20lookup%20istiod.istio-system.svc%20on%20169.254.25.10:53:%20no%20such%20host%22%202021-11-15T16:55:31.419956Z%09error%09cache%09resource:default%20failed%20to%20generate%20secret%20for%20proxy:%20rpc%20error:%20code%20=%20Unavailable%20desc%20=%20connection%20error:%20desc%20=%20%22transport:%20Error%20while%20dialing%20dial%20tcp:%20lookup%20istiod.istio-system.svc%20on%20169.254.25.10:53:%20no%20such%20host%22%202021-11-15T16:55:31.419981Z%09error%09sds%09resource:default%20Close%20connection.%20Failed%20to%20get%20secret%20for%20proxy%20%22router%7E10.233.70.87%7Eistio-egressgateway-794d6f956b-8p5vz.istio-system%7Eistio-system.svc.cluster.local%22%20from%20secret%20cache:%20rpc%20error:%20code%20=%20Unavailable%20desc%20=%20connection%20error:%20desc%20=%20%22transport:%20Error%20while%20dialing%20dial%20tcp:%20lookup%20istiod.istio-system.svc%20on%20169.254.25.10:53:%20no%20such%20host%22%202021-11-15T16:55:31.420070Z%09info%09sds%09resource:default%20connection%20is%20terminated:%20rpc%20error:%20code%20=%20Canceled%20desc%20=%20context%20canceled%202021-11-15T16:55:31.420336Z%09warning%09envoy%20config%09StreamSecrets%20gRPC%20config%20stream%20closed:%2014,%20connection%20error:%20desc%20=%20%22transport:%20Error%20while%20dialing%20dial%20tcp:%20lookup%20istiod.istio-system.svc%20on%20169.254.25.10:53:%20no%20such%20host%22%202021-11-15T16:55:48.020242Z%09warning%09envoy%20config%09StreamAggregatedResources%20gRPC%20config%20stream%20closed:%2014,%20no%20healthy%20upstream%202021-11-15T16:55:48.020479Z%09warning%09envoy%20config%09Unable%20to%20establish%20new%20stream%202021-11-15T16:55:51.025327Z%09info%09sds%09resource:default%20new%20connection%202021-11-15T16:55:51.025597Z%09info%09sds%09Skipping%20waiting%20for%20gateway%20secret,但它显示没有资源。
尝试在非 istio 注入的命名空间中部署应用程序,它可以正常工作,没有任何问题。

我们有运行 Ubuntu-18.04LTS 的裸机集群。

istioctl version

client version: 1.7.0
control plane version: 1.7.0
data plane version: none

库伯内斯v1.18.8

如上所述here http://istio-proxy@istio-ingressgateway-784f857457-2fz4v:/%24%20curl%20https://istiod.istio-system:443/inject%20-k%20%20curl:%20(6)%20Could%20not%20resolve%20host:%20istiod.istio-system, ran kubectl get --raw /api/v1/namespaces/istio-system/services/https:istiod:https-webhook/proxy/inject -v4

I1116 17:05:32.703339   28777 helpers.go:216] server response object: [{
  "metadata": {},
  "status": "Failure",
  "message": "the server rejected our request for an unknown reason",
  "reason": "BadRequest",
  "details": {
    "causes": [
      {
        "reason": "UnexpectedServerResponse",
        "message": "no body found"
      }
    ]
  },
  "code": 400
}]
F1116 17:05:32.703515   28777 helpers.go:115] Error from server (BadRequest): the server rejected our request for an unknown reason

来自 ingres 网关

istio-proxy@istio-ingressgateway-784f857457-2fz4v:/$ curl https://istiod.istio-system:443/inject -k

curl: (6) Could not resolve host: istiod.istio-system

编辑:在主节点中/var/lib/kubelet/config.yaml

clusterDNS:
- 169.254.25.10

我们可以ping从我们的节点到这个IP。

我发现这个在corednsPod 日志

E1123 08:57:05.386992       1 reflector.go:153] pkg/mod/k8s.io/[email protected] /cdn-cgi/l/email-protection/tools/cache/reflector.go:105: Failed to list *v1.Endpoints: Get https://10.233.0.1:443/api/v1/endpoints?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1123 08:57:05.387108       1 reflector.go:153] pkg/mod/k8s.io/[email protected] /cdn-cgi/l/email-protection/tools/cache/reflector.go:105: Failed to list *v1.Service: Get https://10.233.0.1:443/api/v1/services?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused

None

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

由于 istio-sidecar 注入,Kubernetes 部署失败 的相关文章

随机推荐

  • PHP GDAL/OGR 库的使用,哪种方法更干净?

    我将在新项目中使用 gdal ogr 我想要一个精简但功能齐全的应用程序 因此不会使用其他实现 例如地图服务器 因为它们具有我怀疑应用程序中是否需要的无关组件 即使在将来也是如此 根据记录 它是一个 GIS 但我在这里询问是因为 php 中
  • Jackson json反序列化,忽略json中的根元素

    如何忽略 json 中的父标签 这是我的 json String str parent a id 10 name Foo 这是要从 json 映射的类 public class RootWrapper private List
  • .NET“隔离存储”存储在哪里?

    物理文件在哪里 这取决于操作系统以及是否启用漫游用户配置文件 例如 在 XP 上 使用非漫游配置文件时 位置为
  • Asp.net:委托(“操作”)可以序列化为控制状态吗?

    我正在实现一个用户控件 该控件具有一个将 Action 委托作为参数的方法 尝试将委托存储在控制状态中会产生序列化错误 是否有可能将委托序列化为控制状态 BP 这并不容易 而且可能会引发潜在问题 理论上可以使用反射来确定委托正在调用对象的哪
  • 为什么我的 Scrapy 中的输入/输出处理器不工作?

    我正在努力追随本教程 http doc scrapy org en 1 1 intro tutorial html 我想要我的desc字段是标准化为单个空格且大写的单个字符串 dmoz spider py import scrapy fro
  • 通过 REST API 的 VSTS 工作项列表

    如何使用 REST API 从 VSTS 获取工作项列表 根据文档 https www visualstudio com docs integrate api wit work items the ids参数是可选的 但是当我省略它时 我得
  • Android半圆形进度条-绘制半圆

    我用这个创建了一个半圆形进度条devadvance circularSeekBar https github com devadvance circularseekbar当我从调色板中选择自定义视图时 它看起来像这样 在此我有两个带有权重的
  • 转换为“日期时间”类型时出现问题:“小时必须为 0..23”

    这些是我的 csv 文件中的一些示例行 10 10 1949 20 30 san marcos tx us cylinder 2700 45 minutes This event took place in early fall aroun
  • 在 C++ Win32 应用程序中,如何确定私有字节、工作集和虚拟大小[重复]

    这个问题在这里已经有答案了 我正在编写一些用于教育目的的代码 我希望能够从用 C 编写的 Windows 控制台程序中打印这些内存使用值 花了一些时间从这些链接中获取我想要的内容 但它就是这样 大部分困难是让它在 Mingw32 中工作 c
  • Solr 和方面搜索

    当您设置模式时 分面搜索是否内置 或者您是否必须做一些事情来设置它 它基本上可以在您设置为可排序的所有字段上开箱即用吗 那么您只需使用 fq 查询语法 它就会返回构面 xml 以及搜索结果 有没有一篇关于这方面的好文章对您第一次有帮助 是的
  • 了解共享指针的问题(生命周期,作为参数传递)

    我尝试从 boost asio 聊天示例开始并派生出一个自己的网络程序 不幸的是 我在理解到底发生了什么方面遇到了一些问题 我试图将我的程序减少到绝对最低限度 服务器类等待传入连接并创建会话对象来处理连接 这是服务器的代码 include
  • RxSwift:管理应用程序中的对象更新

    我非常关心如何管理对象属性的更改 假设我有一个 汽车 类 其中包含一些属性 例如 名称 日期 价格 等 在我的视图 A 中 我正在显示从 API 检索的所有汽车 在视图 B 和 C 中 我可以显示和编辑有关视图 A 中所选汽车的特定信息 假
  • Gridpane 中的 JavaFx 图像会大幅降低性能

    我想创建一个 GridPane 嵌套在 ScrollPane 中 在其中动态添加单元格到 GridPane 每个单元格都包含一个带有背景图像的 VBox 一些标签和一个复选框 问题是 GridPane 可以包含数百个 VBox 在我的例子中
  • 为什么 Google 测试工具使用“id”属性来生成微数据项的 URL?

    我正在使用一些微数据来描述一篇博客文章 我对 Schema org 的价值回报感到惊讶BlogPosting通过 Google 开发者测试工具 我本以为它是 itempropurl 不是网站 URL 和项目的合并id 我做错了什么 还是只是
  • jQuery,选择具有属性的最近兄弟(下一个或上一个)

    我有一个类似于下面标记的选择下拉列表
  • 如何使用java上传谷歌云存储中的文件

    我已经尝试使用java在Google云存储中上传文件很长时间了 通过浏览我找到了这段代码 但无法准确理解 任何人都可以定制这个以在 GCS 中上传文件吗 Given InputStream inputStream object data e
  • 更快的位图对比度算法

    我有一个带有轨迹栏滑块控件的工具 用于调整图像的亮度 对比度 伽玛值等 我试图在用户拖动滑块时实时更新我的 图像 亮度和伽玛算法的速度是可以接受的 大约170ms 但对比算法大约是380ms 基本上我的表单是一个带有滑块的工具窗口 每次更新
  • 循环遍历一组谷歌工作表值

    我有2组数据 一是坦克名称 Tank Name A1 A2 B1 B2 接下来是开 关数据 ON OFF 0 1 1 1 1 1 0 0 1 1 1 1 1 1 1 0 0 1 1 1 0 1 1 现在我要查看的结果是 当ON OFF为1时
  • 将鼠标悬停在 Shiny 中的元素上时如何更改绘图?

    我正在寻找一种解决方案 当用户将鼠标悬停在同一面板中的超链接上时 可以更改 Shiny 应用程序中的绘图 这是一个简单的例子 library shiny words lt sort sapply 1 50 USE NAMES F FUN f
  • 由于 istio-sidecar 注入,Kubernetes 部署失败

    我们的 K8 集群工作了一年多 最近它出现了一些奇怪的行为 现在当我们使用kubectl apply f deployment manifest yaml 它没有显示在kubectl get pods 但显示在kubectl get dep