kubernetes - 应用 Istio 虚拟服务时超时
问题描述
使用 kubectl apply -f 应用 virtual-service.yaml 会产生超时(30 秒)。
周一我像往常一样在 ISTIO-1.2.4 重新配置了我的虚拟服务。今天我遇到了应用虚拟服务的超时。我做了什么
% kubectl -n istio-system apply -f virtual-service.yaml
Error from server (Timeout): error when creating "virtual-service.yaml": Timeout: request did not complete within requested timeout 30s
% kubectl -n istio-system delete pod istio-ingressgateay*
% kubectl -n istio-system exec istio-ingressgateway* -c istio-proxy -- curl -X POST http://localhost:15000/logging?level=debug
% kubectl -n istio-system logs --follow istio-ingressgateway* -c istio-proxy
% kubectl -n istio-system get gateways.networking.istio.io
NAME AGE
istio-gateway 3d19h
% kubectl -n istio-system get virtualservices.networking.istio.io
NAME GATEWAYS HOSTS AGE
infrastructure-istio-k8s-ingress [istio-gateway] [${DOMAIN}] 3d19h
%
而且我仍然收到 30 秒超时消息并且没有新的虚拟服务,并且我在日志中没有与虚拟服务相关的任何内容。
配置 virtual-service.yaml 看起来像
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: default-istio-k8s-ingress
namespace: istio-system
spec:
gateways:
- istio-gateway-149-81-86-74
hosts:
- "test.procom.energy"
http:
- match:
- uri:
regex: "/head.*s"
rewrite:
uri: "/headers"
route:
- destination:
host: httpbin.default.svc.cluster.local
port:
number: 8000
weight: 100
- match:
- uri:
exact: /ip
route:
- destination:
host: httpbin.default.svc.cluster.local
port:
number: 8000
weight: 100
- match:
- uri:
exact: /user-agent
route:
- destination:
host: httpbin.default.svc.cluster.local
port:
number: 8000
weight: 100
我期待一个新的应用虚拟服务,我只看到超时。在这种情况下,我没有任何可能重新配置虚拟服务或应用新服务。
解决方案
嘿你。
我修好了它。在令人失望的深入观察之后,我没有重新加载所有 POD(通过 for 循环)。之后,我重新启动所有节点并删除了 istio-system 命名空间中的所有副本集,我可以重新配置或应用我的虚拟服务。
最好的问候,扬
推荐阅读
- php - 候选人备注数据无法发布到页面的 PHP 部分?
- flutter - Flutter 如何在没有 MediaQuery 的情况下获得亮度?
- scala - Scala Trait如何覆盖派生的toString案例类
- java - hibernate:为什么 session.update() 会产生 OptimisticLockException?
- rest - 如何将 UINT(不是 uint64 或 uint32)与字符串进行比较
- spring - Outh2 访问令牌异常
- flutter - 自动完成位置小部件在点击位置时返回错误
- javascript - 如何创建一个复杂的 Javascript 对象
- bash - Expand a variable containing a prefix that is a name of the directory containing all files by indicate the extension of files
- php - wordpress acf 日期问题