Kubernetes服务对象针对2个不同的Pod

时间:2020-03-09 05:01:35

标签: openshift

我有2个功能相似的不同容器,不同的选择器和标签。我想使用以下文档中提到的备用后端和路由- https://docs.openshift.com/container-platform/3.6/architecture/networking/routes.html#alternateBackends

apiVersion: v1
kind: Route
metadata:
  name: route-alternate-service
  annotations:
    haproxy.router.openshift.io/balance: roundrobin
spec:
  host: www.example.com
  to:
    kind: Service
    name: service-name  
    weight: 20          
  alternateBackends:
  - kind: Service
    name: service-name2
    weight: 10

我担心的是,如果第一个服务关闭,将会发生什么情况-所有流量都将重定向到第二个备用服务。请建议

0 个答案:

没有答案