[英]Istio on GKE - Admission webhook not working to inject sidecar-porxy
我一直在尝试在我现有的 GKE 集群上设置 Istio。
我按照 Istio 网站上提到的步骤进行安装 - 先决条件。
https://istio.io/latest/docs/setup/platform-setup/gke/
我有一个私有集群,所以我在先决条件中添加了防火墙规则。
gke-aiq-kubernetes-0a227ee8-all default INGRESS 1000 tcp,udp,icmp,esp,ah,sctp False
gke-aiq-kubernetes-0a227ee8-master default INGRESS 1000 tcp:10250,tcp:443,tcp:15017 False
gke-aiq-kubernetes-0a227ee8-vms default INGRESS 1000 tcp:1-65535,udp:1-65535,icmp False
然后使用演示配置文件安装 istio。
istioctl install --set profile=demo
然后验证安装
istioctl verify-install
这表示一切都成功了。
我用 namecpace 标记为“instio-inject=enabled”,这样我就可以自动注入 sidecar porxy。
但是,当我尝试在命名空间中部署某些内容时,出现以下错误:
Error from server (InternalError): error when creating "pod-pending.yaml": Internal error occurred: failed calling webhook "sidecar-injector.istio.io": Post https://istiod.istio-system.svc:443/inject?timeout=30s: context deadline exceeded
我从中了解到存在一些连接问题,但我不确定如何调试它。
我尝试了 istio 的调试页面:
https://github.com/istio/istio/wiki/Troubleshooting-Istio#diagnostics
并在运行命令后:
kubectl get --raw /api/v1/namespaces/istio-system/services/https:istiod:https-webhook/proxy/inject -v4
我同意这是连接问题:
t -v5
I1113 23:20:11.241079 40356 helpers.go:199] server response object: [{
"metadata": {},
"status": "Failure",
"message": "the server is currently unable to handle the request",
"reason": "ServiceUnavailable",
"details": {
"causes": [
{
"reason": "UnexpectedServerResponse",
"message": "Error trying to reach service: 'dial tcp 10.48.3.25:15017: i/o timeout'"
}
]
},
"code": 503
}]
F1113 23:20:11.241367 40356 helpers.go:114] Error from server (ServiceUnavailable): the server is currently unable to handle the request
需要帮助,我是 GKE 的新手。
我想通了这个问题。
我有 7 个不同的 GCP 项目配置了我的 gcloud 配置文件,我在运行 gcloud 命令时在不同的项目中。 (所有 gke 集群都具有相同的名称)
从命令行执行的步骤:
我从浏览器登录到 GCP UI,搜索 VPC 下的防火墙并在那里手动打开端口并且它工作正常。
gcloud compute firewall-rules list --filter="name~gke-<clustername>-[0-9a-z]*-master"
然后获取防火墙规则名称。
gcloud compute firewall-rules update <firewall rule name> --allow tcp:10250,tcp:443,tcp:15017
这里的想法是添加准入挂钩所需的tcp:15017 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.