【问题标题】:Istio Installation successful but not able to deploy PODIstio 安装成功但无法部署 POD
【发布时间】:2021-04-22 21:43:13
【问题描述】:

我已经在 k8 集群中成功安装了 Istio。

  • Istio 版本为 1.9.1

  • 使用的 Kubernetes CNI 插件:Calico 版本 3.18(Calico POD 已启动并正在运行)

kubectl get pod -A

istio-system           istio-egressgateway-bd477794-8rnr6           1/1     Running   0          124m
istio-system           istio-ingressgateway-79df7c789f-fjwf8        1/1     Running   0          124m
istio-system           istiod-6dc55bbdd-89mlv                       1/1     Running   0          124

当我尝试部署示例 nginx 应用时,我收到以下错误:

failed calling webhook sidecar-injector.istio.io context deadline exceeded
Post "https://istiod.istio-system.svc:443/inject?timeout=30s": 
context deadline exceeded

当我禁用自动代理 sidecar 注入时,pod 正在部署且没有任何错误。

kubectl label namespace default istio-injection-

我不知道如何解决这个问题,请有人帮我解决这个问题吗?

【问题讨论】:

  • 你有什么版本的 Kubernetes?您在裸机或托管 Kubernetes 服务上有 Kubernetes 吗?您是否可以在 spec.template.spec 下将 hostNetwork:true 添加到您的 istiod 部署中?
  • 添加 hostNetwork: true 后它现在可以工作了

标签: kubernetes istio calico


【解决方案1】:

在这种情况下,将hostNetwork:true 添加到spec.template.spec 下的istiod 部署可能会有所帮助。 在将 Calico CNI 用于 pod 网络时,这似乎是一种解决方法(请参阅:failed calling webhook "sidecar-injector.istio.io

我们可以在Kubernetes Host namespaces documentation 中找到:

HostNetwork - 控制 pod 是否可以使用节点网络命名空间。这样做可以让 pod 访问回送设备、侦听 localhost 的服务,并可用于窥探同一节点上其他 pod 的网络活动。

【讨论】:

    猜你喜欢
    • 2019-07-20
    • 2021-03-19
    • 2020-05-18
    • 2012-04-25
    • 2017-07-17
    • 2015-12-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多