代码之家  ›  专栏  ›  技术社区  ›  Timothy Wu

无法运行istio-ingressgateway,获取就绪探测失败:连接被拒绝

  •  0
  • Timothy Wu  · 技术社区  · 4 年前

    我部署istio失败,遇到了这个问题。当我尝试使用部署istio时 istioctl install --set profile=default -y 。输出如下:

    ➜  istio-1.11.4 istioctl install --set profile=default -y
    ✔ Istio core installed                                                                                                                                                                        
    ✔ Istiod installed                                                                                                                                                                            
    ✘ Ingress gateways encountered an error: failed to wait for resource: resources not ready after 5m0s: timed out waiting for the condition                                                     
      Deployment/istio-system/istio-ingressgateway (containers with unready status: [istio-proxy])
    - Pruning removed resources                                                                                                                                                                   Error: failed to install manifests: errors occurred during operation
    

    运行后 kubectl get pods -n=istio-system ,我发现istio-ingressgateway的pod已经创建,结果描述为:

    Events:
      Type     Reason     Age                     From               Message
      ----     ------     ----                    ----               -------
      Normal   Scheduled  4m36s                   default-scheduler  Successfully assigned istio-system/istio-ingressgateway-8dbb57f65-vc85p to k8s-slave
      Normal   Pulled     4m35s                   kubelet            Container image "docker.io/istio/proxyv2:1.11.4" already present on machine
      Normal   Created    4m35s                   kubelet            Created container istio-proxy
      Normal   Started    4m35s                   kubelet            Started container istio-proxy
      Warning  Unhealthy  3m56s (x22 over 4m34s)  kubelet            Readiness probe failed: Get "http://10.244.1.4:15021/healthz/ready": dial tcp 10.244.1.4:15021: connect: connection refused
    

    我无法获取此吊舱的日志:

    ➜  ~ kubectl logs pods/istio-ingressgateway-8dbb57f65-vc85p -n=istio-system
    Error from server: Get "https://192.168.0.154:10250/containerLogs/istio-system/istio-ingressgateway-8dbb57f65-vc85p/istio-proxy": dial tcp 192.168.0.154:10250: i/o timeout
    

    我在华为云的两个虚拟机上运行了所有这些命令,在ubuntu18.04中有一个2C8G主机和一个2C4G从机。我已经重新安装了环境和kubernetes集群,但这没有帮助。

    没有入口网关

    我也试过 istioctl install --set profile=minimal -y 只运行istiod。但是当我尝试运行httpbin时( kubectl apply -f samples/httpbin/httpbin.yaml )启用自动注入后,部署无法创建pod。

    ➜  istio-1.11.4 kubectl get deployment
    NAME      READY   UP-TO-DATE   AVAILABLE   AGE
    httpbin   0/1     0            0           5m24s
    ➜  istio-1.11.4 kubectl describe deployment/httpbin 
    ...
    Events:
      Type    Reason             Age   From                   Message
      ----    ------             ----  ----                   -------
      Normal  ScalingReplicaSet  6m6s  deployment-controller  Scaled up replica set httpbin-74fb669cc6 to 1
    

    当我取消标记默认命名空间时( kubectl label namespace default istio-injection- ),一切都很好。

    我希望部署istio-ingressgateway并像这样运行demo istio-ingressgateway ,但我不知道如何解决这种情况。谢谢你的帮助。

    0 回复  |  直到 4 年前
        1
  •  2
  •   Timothy Wu    4 年前

    我犯了一个愚蠢的错误,奥兹。

    在与我的云提供商通信后,我被告知我的云服务器有网络安全策略。奇怪的是,一台服务器具有完全访问权限,而另一台服务器则具有部分访问权限(这只允许端口如80443等)。我改变政策后,一切都很好。

    对于可能遇到类似问题的人,我在谷歌搜索了几个小时后发现所有这些问题似乎都伴随着网络问题,如dns配置、k8s配置或服务器网络问题。就像howardjohn在这篇文章中所说的那样 issue ,这不是istio的问题。

    推荐文章