Istio 创建 gateway 之后 istio ingressgateway 配置同步错误: istio ingress STALE (Never Acknowledged)

错误场景: 随意创建一个绑定 80 端口 gateway 的之后,访问之后发现失败,随后查看日志以及 ingressgateway 的状态发现以下错误:
ingress 日志

gRPC config for type.googleapis.com/envoy.config.listener.v3.Listener rejected: Error adding/updating listener(s) 0.0.0.0_80: cannot bind '0.0.0.0:80': Permission denied
2020-09-03T06:25:43.399052Z     warn    Envoy proxy is NOT ready: config not received from Pilot (is Pilot running?): cds updates: 14 successful, 0 rejected; lds updates: 0 successful, 14 rejected

ingress 的配置同步状态

istio ingress STALE (Never Acknowledged)

istiod 的日志

ADS:LDS: ACK ERROR router~10.0.17.111~istio-ingressgateway-68fb887bf8-pxs82.istio-system~istio-system.svc.cluster.local-32 Internal:Error adding/updating listener(s) 0.0.0.0_80: cannot bind '0.0.0.0:80': Permission denied

gateway 内容

apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: my-gateway
spec:
  selector:
    istio: ingressgateway
    gateway: my-ingressgateway
  servers:
  - port:
      number: 80
      name: http
      protocol: HTTP
    hosts:
    - some-host

这个错误看着比较懵,经过测试之后排除 istiod 的问题。首先可以确定的是 ingressgateway 的状态并没有同步,所以造成了访问失败。而没有同步状态的原因 istiod 与 ingressgateway 提示的非常清楚,监听绑定 0.0.0.0:80 权限不足,80 是我们 gateway 使用的端口,为什么权限不足?

搜索一些相关问题发现了答案!

解决问题
出现这个问题的场景以及解决办法,在一个 issue 中找到。造成问题的原因则是,使用了 ingressgateway 没有开放的端口(我的 istio 使用 iop 部署某些原因导致没有开放 80 端口),ingressgateway 开发 gateway 指定端口即可修复问题。

- enabled: true
  name: my-ingressgateway
  label:
    gateway: my-ingressgateway
  k8s:
    service:
      ports:
      - name: https
         port: 443
         protocol: TCP
         targetPort: 8443
      - name: https
         port: 80
         protocol: TCP
         targetPort: 8080

你可能感兴趣的:(istio,istio,gateawy,pilot,ingressgateway,envoy)