我部署istio失败,遇到了这个问题。当我尝试使用istioctl install --set profile=default -y
部署istio时。输出如下:
➜ 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集群,但这无济于事。
没有ingressgateway
我还尝试了只运行istiod的istioctl install --set profile=minimal -y
。但是,当我尝试在启用自动注入的情况下运行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并像istio-ingress gateway一样运行demo,但我不知道如何解决这种情况。谢谢你的帮助。
我犯了一个愚蠢的错误Orz。
在与我的云提供商通信后,我被告知我的云服务器有网络安全策略。奇怪的是,一台服务器具有完全访问权限,而另一台服务器则具有部分访问权限(这只允许端口像80443等(。我改变政策后,一切都很好。
对于可能遇到类似问题的人来说,我在谷歌搜索了几个小时后发现,所有这些问题似乎都伴随着网络问题,如dns配置、k8s配置或服务器网络问题。就像howardjohn在本期文章中所说的,这不是istio的问题。