如何解决Kiali:避免 KIA1106 - 同一主机的多个虚拟服务
我在 Istio/Kubernetes 上使用 Kiali 来监控我的网格。
我需要根据 URL 包含路由 2 个不同的 Pod,为此,我正在学习 Split large virtual services and destination rules into multiple resources 中的教程。因此,我为同一主机和网关创建了 2 个 VirtualService:
服务 1:
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
Metadata:
name: vs-product-composite
spec:
hosts:
- "kubernetes.b-thinking.com"
gateways:
- gw-ingress
http:
- match:
- uri:
prefix: /product-composite
route:
- destination:
port:
number: 80
host: product-composite
服务 2:
apiVersion: apps/v1
kind: Deployment
Metadata:
name: uaa
spec:
replicas: 1
selector:
matchLabels:
app: uaa
template:
Metadata:
labels:
app: uaa
spec:
containers:
- name: uaa
image: bthinking/uaa
imagePullPolicy: Never
env:
- name: LOGGING_LEVEL_ROOT
value: DEBUG
ports:
- containerPort: 8090
resources:
limits:
memory: 350Mi
---
apiVersion: v1
kind: Service
Metadata:
name: uaa
spec:
type: NodePort
selector:
app: uaa
ports:
- port: 8090
nodePort: 31090
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
Metadata:
name: vs-auth
spec:
hosts:
- "kubernetes.b-thinking.com"
gateways:
- gw-ingress
http:
- match:
- uri:
prefix: /oauth
rewrite:
uri: "/uaa/oauth"
route:
- destination:
port:
number: 8090
host: uaa
但是,我收到警告 KIA1106 - More than one Virtual Service for same host
查看 docs,它解释了案例(这是我的案例),但它重定向到我遵循的同一指南。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。