antrea icon indicating copy to clipboard operation
antrea copied to clipboard

Egress HA assigns different egress ips to same egress interface on same egress node

Open rajnkamr opened this issue 10 months ago • 6 comments

Describe the bug

Egress HA assigns different egress ips to same egress interface on same egress node. It should be avoided unless nodeselector is provided as same egress node. NAME EGRESSIP AGE NODE egress-prod-web 172.18.0.11 19h bgp-worker2

egress-staging-web 172.18.0.12 19h bgp-worker2

Egress Interface

14: antrea-egress0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default link/ether e2:12:06:f2:dc:2f brd ff:ff:ff:ff:ff:ff inet 172.18.0.11/32 scope global antrea-egress0 valid_lft forever preferred_lft forever

inet 172.18.0.12/32 scope global antrea-egress0 valid_lft forever preferred_lft forever

To Reproduce

Apply below config 1.externalippool.yaml

apiVersion: crd.antrea.io/v1beta1
kind: ExternalIPPool
metadata:
  name: external-ip-pool
spec:
  ipRanges:
  - start: 172.18.0.11  # 172.18.0.11-172.18.0.20 can be used as Egress IPs
    end: 172.18.0.20
  nodeSelector: {}     # All Nodes can be Egress Nodes`

2.egress1.yaml

apiVersion: crd.antrea.io/v1beta1
kind: Egress
metadata:
  name: egress-prod-web
spec:
  appliedTo:
    namespaceSelector:
      matchLabels:
        kubernetes.io/metadata.name: prod
    podSelector:
      matchLabels:
        app: web
  externalIPPool: external-ip-pool`

3.egress2.yaml

apiVersion: crd.antrea.io/v1beta1
kind: Egress
metadata:
  name: egress-staging-web
spec:
  appliedTo:
    namespaceSelector:
      matchLabels:
        kubernetes.io/metadata.name: staging
    podSelector:
      matchLabels:
        app: web
  externalIPPool: external-ip-pool`

Expected

Unless nodeselector is a single egress node, the expectation should be to assign egress ip to different interfaces on different nodes to avoid external traffic disruption for all egress workloads !

Actual behavior

Versions:

Additional context

rajnkamr avatar Nov 28 '24 05:11 rajnkamr