Skip to content

Add Amazon VPC CNI route-agent handler - #4100

Open
sanek9 wants to merge 1 commit into
submariner-io:develfrom
sanek9:feat/aws-vpc-cni-handler
Open

Add Amazon VPC CNI route-agent handler#4100
sanek9 wants to merge 1 commit into
submariner-io:develfrom
sanek9:feat/aws-vpc-cni-handler

Conversation

@sanek9

@sanek9 sanek9 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

Amazon VPC CNI (EKS) is not a kube-proxy / OVN-style overlay. Pods get VPC ENI
addresses, and AWS CNI installs custom PBR tables for secondary ENIs. The
existing kubeproxy VXLAN route-agent path assumes a different model: routes in
the main table and a shared host network path that “just works” once VXLAN is up.

On EKS that is not enough:

  1. Workers — remote cluster CIDRs programmed only in main are ignored for
    traffic that AWS CNI sends through its ENI-specific tables, so packets leave
    via the VPC default route instead of Submariner (see Submariner Route Agent fails to populate custom PBR tables created by AWS CNI, causing intermittent cross-cluster connectivity loss #3697).
  2. Active gateway — return traffic from the cable must reach local pods via
    VTEP. Putting node InternalIP /32 into main via VTEP breaks VXLAN underlay
    (FDB destination is the node IP). Pod /32 via VTEP belongs in main; node
    /32 must live in a dedicated PBR table selected only for cable/remote ingress.

Security Groups typically drop foreign pod CIDRs on the VPC path, so “just open
the VPC route” is not a reliable substitute for a correct Submariner datapath.

A separate awsvpc handler keeps this logic out of the generic kubeproxy path
and activates only when SUBMARINER_NETWORKPLUGIN=amazon-vpc-cni (set by the
operator discovery companion PR).

What it does:

  • Active gateway: pod /32 via VTEP in main; node /32 in a dedicated PBR table
  • Workers: replicate remote CIDRs (and related ranges) into AWS CNI PBR tables
  • Periodic reconcile re-lists pods/nodes to avoid races before vx-submariner exists
  • No-op for other CNIs (no regression on kube-proxy / OVN handlers)

Fixes / addresses

Depends on / related

  • Prefer after operator discovery PR that sets plugin name to amazon-vpc-cni
  • Related diagnose support in subctl

Checklist

  • Unit tests
  • No regression on kube-proxy / OVN handlers

Cross-links (this series)

Made with Cursor

Summary by CodeRabbit

  • New Features
    • Added Amazon VPC CNI (amazon-vpc-cni) to the supported network plugins list.
    • Introduced an AWSVPC route-agent handler with on-gateway ingress route management.
    • Programs /32 pod ingress routes via VTEPs and manages gateway node ingress routing using dedicated policy-based routing tables.
    • Continuously reconciles ingress and routing policy as pods, nodes, and endpoints change.
  • Tests
    • Added an AWSVPC route-agent test suite covering gateway behavior and table selection.
    • Updated handler initialization tests to include the AWSVPC route-agent.

@sanek9

sanek9 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Operator discovery: >>> Creating PR #6: submariner-operator feat/aws-vpc-cni-discovery -> devel
submariner-io/submariner-operator#4143; diagnose: >>> Creating PR #8: subctl feat/aws-vpc-cni-diagnose -> devel
submariner-io/subctl#1831

@submariner-bot

Copy link
Copy Markdown
Contributor

🤖 Created branch: z_pr4100/sanek9/feat/aws-vpc-cni-handler
🚀 Full E2E won't run until the "ready-to-test" label is applied. I will add it automatically once the PR has 2 approvals, or you can add it manually.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds an IPv4 AWS VPC CNI route-agent handler, registers it with plugin discovery and startup, programs ingress and CNI policy-table routes, handles Kubernetes events and reconciliation, and adds route-programming tests.

Changes

AWS VPC CNI route-agent

Layer / File(s) Summary
Plugin discovery and handler registration
pkg/cni/plugins.go, pkg/routeagent_driver/main.go, pkg/routeagent_driver/handlers/handlers_test.go
Adds amazon-vpc-cni support, registers the IPv4 handler, and verifies initialization.
Handler lifecycle and event orchestration
pkg/routeagent_driver/handlers/awsvpc/handler.go
Adds lifecycle methods, gateway transitions, Kubernetes event handling, endpoint synchronization, and periodic reconciliation.
Ingress routes and policy rules
pkg/routeagent_driver/handlers/awsvpc/ingress.go
Programs pod and node /32 routes through VTEPs, maintains policy rules, and cleans up stale routes.
CNI policy table routes
pkg/routeagent_driver/handlers/awsvpc/tables.go
Discovers CNI routing tables and manages remote CIDR and VTEP routes.
AWS VPC CNI route validation
pkg/routeagent_driver/handlers/awsvpc/handler_test.go
Tests plugin selection, pod and node route programming, and gateway-local exclusions.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Kubernetes
  participant AWSVPCHandler
  participant Netlink
  Kubernetes->>AWSVPCHandler: Pod, node, and endpoint events
  AWSVPCHandler->>Netlink: Program ingress and policy routes
  Netlink-->>AWSVPCHandler: Route state
  AWSVPCHandler->>AWSVPCHandler: Reconcile tracked routes and CIDRs
Loading

Suggested reviewers: skitt, sridhargaddam, tpantelis, yboaron


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Actionable Comments Resolved ❌ Error Two actionable review requests remain: localGatewayVTEP still scans vx-submariner routes, and awsvpc tests still lack CNI table-replication coverage. Track the gateway IP in Handler, derive the VTEP via vxlan.GetVtepIPAddressFrom, and add a worker-side CNI table-replication test.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding an Amazon VPC CNI route-agent handler.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sanek9

sanek9 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Part of the proposal overview: #4101

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (2)
pkg/routeagent_driver/handlers/awsvpc/tables.go (1)

167-186: 🎯 Functional Correctness | 🔵 Trivial | 🏗️ Heavy lift

Fragile heuristic for discovering the local gateway VTEP.

localGatewayVTEP returns the first route on vx-submariner with a non-nil, non-unspecified Gw, assuming exactly one such route exists and it always points to the active gateway's VTEP. If the main table on a worker ever contains more than one Gw-bearing route on this link (e.g. a stale route left over from a prior gateway during failover, before cleanup completes, or a route from another mechanism), this silently picks an arbitrary one, which would then get replicated into every discovered AWS CNI PBR table via ensureTableRoute — potentially misrouting all remote-cluster traffic from workers until the state settles.

Given vtepForNodeLocked (ingress.go) already derives a VTEP directly via vxlan.GetVtepIPAddressFrom from a known node IP, it would be more robust for localGatewayVTEP to do the same from the active gateway's known IP (if that's tracked in handler state) rather than reverse-engineering it from arbitrary existing routes on the link.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/routeagent_driver/handlers/awsvpc/tables.go` around lines 167 - 186,
Update localGatewayVTEP to derive the VTEP with the same
vxlan.GetVtepIPAddressFrom approach used by vtepForNodeLocked, using the active
gateway’s tracked IP from Handler state. Remove the route-list iteration that
selects the first non-unspecified Gw, and preserve nil behavior when the gateway
identity or VTEP lookup is unavailable.
pkg/routeagent_driver/handlers/awsvpc/handler_test.go (1)

65-130: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

No coverage for CNI PBR table replication (tables.go).

The suite validates plugin selection, pod/node ingress routes, and gateway-local exclusion, but there's no test exercising syncCNITableRoutesLocked/discoverCNIRoutingTables/ensureTableRoute — the worker-side remote-CIDR replication into AWS CNI policy tables, which is a core piece of this PR's stated purpose. Consider adding a case that seeds a fake "from <podIP> lookup <table>" rule on a worker node and asserts remote CIDR + VTEP-prefix routes get programmed into that table (and removed on cleanup).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/routeagent_driver/handlers/awsvpc/handler_test.go` around lines 65 - 130,
Add coverage in the Amazon VPC CNI handler tests for worker-side CNI
policy-table replication: seed a fake “from podIP lookup table” rule, then
assert remote CIDR and VTEP-prefix routes are programmed into that table and
removed during cleanup. Exercise the existing syncCNITableRoutesLocked,
discoverCNIRoutingTables, and ensureTableRoute behavior while preserving the
current route and gateway-local tests.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/routeagent_driver/handlers/awsvpc/handler.go`:
- Around line 436-447: Update Handler to retain the pod informer cache store
during Init, then change programAllPodIngressRoutes to iterate over cached pod
objects instead of calling the CoreV1 Pods List API. Remove its ctx parameter
and update callers in TransitionToGateway and reconcile accordingly, preserving
onPod processing for every cached pod.
- Around line 358-385: Update the Handler state by adding and initializing
remoteEndpointSubnets keyed by endpoint identity, then revise syncRemoteEndpoint
to replace each endpoint’s recorded IPv4 subnet list on add/update and remove
that endpoint’s record on deletion. Rebuild remoteCIDRs from all remaining
endpoint subnet records before syncing routes and ingress policy, preserving
shared subnets until no active endpoint advertises them.

In `@pkg/routeagent_driver/handlers/awsvpc/ingress.go`:
- Around line 34-55: Update Handler.onPod and the delete handling around
removeIngressRouteByIP so the pod IP is captured separately before deletion and
passed through explicitly. Ensure removeIngressRouteByIP uses the captured IP
rather than re-deriving it from pod.Status, including for
DeletedFinalStateUnknown or stale delete objects, while preserving current add
and non-deleted behavior.

In `@pkg/routeagent_driver/main.go`:
- Line 169: Move awsvpc.NewHandler from the unconditional handler setup into the
for _, family := range cidr.ExtractIPFamilies(env.ClusterCidr) loop, passing
family instead of k8snet.IPv4. Remove the existing hardcoded instantiation so
IPv6-only clusters skip the IPv4-specific handler while dual-stack clusters
initialize it per family.

---

Nitpick comments:
In `@pkg/routeagent_driver/handlers/awsvpc/handler_test.go`:
- Around line 65-130: Add coverage in the Amazon VPC CNI handler tests for
worker-side CNI policy-table replication: seed a fake “from podIP lookup table”
rule, then assert remote CIDR and VTEP-prefix routes are programmed into that
table and removed during cleanup. Exercise the existing
syncCNITableRoutesLocked, discoverCNIRoutingTables, and ensureTableRoute
behavior while preserving the current route and gateway-local tests.

In `@pkg/routeagent_driver/handlers/awsvpc/tables.go`:
- Around line 167-186: Update localGatewayVTEP to derive the VTEP with the same
vxlan.GetVtepIPAddressFrom approach used by vtepForNodeLocked, using the active
gateway’s tracked IP from Handler state. Remove the route-list iteration that
selects the first non-unspecified Gw, and preserve nil behavior when the gateway
identity or VTEP lookup is unavailable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2d3a8662-b396-49fe-a565-0f7b56eec40b

📥 Commits

Reviewing files that changed from the base of the PR and between 9fbf16f and 4556eb2.

📒 Files selected for processing (7)
  • pkg/cni/plugins.go
  • pkg/routeagent_driver/handlers/awsvpc/handler.go
  • pkg/routeagent_driver/handlers/awsvpc/handler_test.go
  • pkg/routeagent_driver/handlers/awsvpc/ingress.go
  • pkg/routeagent_driver/handlers/awsvpc/tables.go
  • pkg/routeagent_driver/handlers/handlers_test.go
  • pkg/routeagent_driver/main.go

Comment thread pkg/routeagent_driver/handlers/awsvpc/handler.go
Comment thread pkg/routeagent_driver/handlers/awsvpc/handler.go Outdated
Comment thread pkg/routeagent_driver/handlers/awsvpc/ingress.go
Comment thread pkg/routeagent_driver/main.go Outdated
@sanek9
sanek9 force-pushed the feat/aws-vpc-cni-handler branch 4 times, most recently from eda9f83 to 33a6341 Compare July 22, 2026 14:19
Program VTEP host routes and node-ingress PBR for Amazon VPC CNI
so active-gateway return traffic and secondary-ENI tables work on EKS.

Signed-off-by: sanek9 <sanya0996@gmail.com>
@sanek9
sanek9 force-pushed the feat/aws-vpc-cni-handler branch from 33a6341 to 8622e3c Compare July 27, 2026 12:56
@yboaron

yboaron commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Hi @sanek9, thanks for tackling #3697. A few Qs:

A. Do we really need a dedicated handler here?

The core issue is replicating routes to custom PBR tables. Could we extend the existing
kube-proxy handler with a ConfigMap listing tables (user should create this CM)?

apiVersion: v1
kind: ConfigMap
metadata:
name: submariner-route-tables
data:
tables: "2,3,4" # User-configured

It should be generic (works for any kubeproxy based CNI using custom tables)

B. Gateway ingress datapath

The PR programs per-pod /32 routes on the gateway. Submariner's design relies on the CNI to handle ingress datapath after IPsec decryption - we'd like to stick with this approach.

Can you clarify:

  • Why does traffic from the cable need pod /32 routes?
  • What breaks if we rely on CNI routing (as standard Submariner does)?

Thanks!

@sanek9

sanek9 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Hi @yboaron!

Following your advice, I have prepared a branch with the submariner-route-tables ConfigMap. (If we go with this approach, it probably makes sense to open a new PR).

https://github.com/sanek9/submariner/tree/feat/configurable-route-tables

And I set AI to work on figuring it out.

On a personal note, it feels like there are quite a lot of AWS-specific requirements... You can't just join any cluster out of the box. You need to add the CIDR to the security group... For someone setting this up for the first time, it's a bit tricky. For instance, we use Karpenter, where as far as I understand, setting SourceDestCheck=false isn't supported...

Below, I'm attaching the answer to why /32 was used, followed by the lab report:

1. Why Per-Pod Routes Are Required for Unicast VXLAN

A shared subnet can only be used when it has one next hop. With AWS VPC CNI,
that condition generally does not hold: pod IP addresses from the same subnet
may be assigned to different worker nodes.

For example:

10.0.12.17  -> worker-a / VTEP 240.0.0.2
10.0.12.18  -> worker-b / VTEP 240.0.0.3
10.0.12.19  -> worker-a / VTEP 240.0.0.2

Installing a route such as:

10.0.12.0/24 via 240.0.0.2 dev vx-submariner

would send traffic for 10.0.12.18 to worker-a, even though its pod is on
worker-b. A Linux route cannot select a different VTEP for individual pod IPs
within one prefix.

A /32 route is correct because it maps one pod address to one worker VTEP:

pod IP -> worker VTEP

Prefix aggregation is possible only when the CNI guarantees a distinct,
non-overlapping pod prefix per node. AWS VPC CNI Prefix Delegation could,
in principle, allow a route for each assigned ENI prefix (for example,
/28) rather than one /32 per pod. However, this does not apply to the
normal secondary-IP allocation mode and would still require tracking prefix
allocation and movement between nodes.

Consequently, per-pod /32 routes are the universally correct solution for
unicast VXLAN delivery when AWS pod IPs are allocated arbitrarily across
workers.


2. AWS PBR replication: return-path diagnosis

Date: 2026-07-30
Clusters: ma-eks-cluster-dev (AWS EKS) → websites-stage-omni
Scope: test the ConfigMap-based PBR route replication and identify the
remaining cross-cluster TCP failure.

Change under test

The AWS cluster runs:

mitgo/submariner-route-agent:route-tables1
SUBMARINER_NETWORKPLUGIN=generic

The following ConfigMap was added in submariner-operator on AWS:

apiVersion: v1
kind: ConfigMap
metadata:
  name: submariner-route-tables
data:
  tables: "2,3"

Every route-agent restarted and logged:

Replicating inter-cluster routes into tables [2 3]
from ConfigMap "submariner-route-tables"

PBR result: fixed

On AWS non-gateway node
ip-10-151-4-224.eu-central-1.compute.internal, the configured tables
previously had only an ENI default route. After the ConfigMap, each includes:

table 2
10.96.0.0/12 via 240.151.3.171 dev vx-submariner
10.244.0.0/16 via 240.151.3.171 dev vx-submariner
240.0.0.0/8 dev vx-submariner scope link

table 3
10.96.0.0/12 via 240.151.3.171 dev vx-submariner
10.244.0.0/16 via 240.151.3.171 dev vx-submariner
240.0.0.0/8 dev vx-submariner scope link

Policy route lookups therefore select the local gateway VTEP:

ip route get 10.244.6.103 from 10.151.4.19
10.244.6.103 from 10.151.4.19 via 240.151.3.171 dev vx-submariner table 2

ip route get 10.244.6.103 from 10.151.4.215
10.244.6.103 from 10.151.4.215 via 240.151.3.171 dev vx-submariner table 3

This confirms that the ConfigMap feature fixes the AWS worker-side PBR gap
from issue #3697.

End-to-end result: still failing

subctl verify scheduled its connector on the same AWS non-gateway node and
a listener on websites:

connector node: ip-10-151-4-224.eu-central-1.compute.internal
listener IP:    10.244.7.200
result:         Ncat: TIMEOUT

To make the return path observable, an explicit pinned probe was created:

Pod Cluster Node IP
connector AWS ip-10-151-4-224 10.151.5.217
listener websites omni-worker-1 10.244.4.87

TCP from connector to listener timed out:

nc -vz -w 10 10.244.4.87 8080
Ncat: TIMEOUT.

Important correction: AWS gateway underlay route is expected

The websites gateway has the correct forward path to its local listener:

ip route get 10.244.4.87
10.244.4.87 dev cilium_host src 10.244.6.103

The tunnel/XFRM policies match both directions for the cluster CIDRs:

src 10.151.0.0/16 dst 10.244.0.0/16
src 10.244.0.0/16 dst 10.151.0.0/16

After the reply returns from websites to the AWS gateway, the AWS gateway
looks up the individual AWS pod IP through the VPC:

AWS gateway: ip route get 10.151.5.217
10.151.5.217 via 10.151.2.1 dev ens5 src 10.151.3.171

This is not itself a bug. As clarified by yboaron in Submariner PR #4099,
the intentional asymmetric ingress path is:

remote cluster → cable driver → local gateway → CNI routes → destination pod

For AWS VPC CNI, the pod IP is a secondary VPC ENI IP. The VPC fabric is
expected to deliver a packet for that IP to the worker ENI; Submariner should
not re-encapsulate this ingress packet through vx-submariner.

What is proven

  1. Worker egress PBR is fixed: AWS VPC CNI tables 2/3 contain remote
    pod/service routes and the VTEP prefix. Source-policy route lookups select
    vx-submariner.
  2. A real TCP flow still times out: connector 10.151.5.217 on AWS to
    listener 10.244.4.87 on websites.
  3. The AWS gateway's route to 10.151.5.217 via ens5 is expected, not
    evidence that /32 via vx-submariner routes are required.

Root cause: AWS forwarding and Security Group configuration

AWS credentials were renewed and the VPC configuration was read after the
initial diagnosis. Two required AWS gateway/worker settings are missing.

1. Source/destination check is enabled on the AWS gateway

The active AWS gateway is EC2 instance i-0ac399af4c4074013; its primary
gateway ENI is eni-0ae05cfe45d0d09cd (10.151.3.171).

instance SourceDestCheck: true
gateway ENI SourceDestCheck: true

For the ingress flow, the gateway forwards a decrypted packet whose source is
the remote pod (10.244.x.x) and whose destination is an AWS secondary pod
IP (10.151.x.x). Neither address belongs to the gateway ENI. AWS
source/destination checking drops such forwarded traffic unless it is disabled
on the gateway instance/ENIs. This is the same AWS prerequisite required for
an EC2 instance acting as a router/VPN appliance.

2. Worker ENI Security Group denies TCP from the remote pod CIDR

The source worker i-060d1a245260dc56e and all of its ENIs use:

sg-0ba130fce0ffa3ae3
ma-eks-cluster-dev-node-20260504123155788600000003

The probe pod IP 10.151.5.217 belongs to secondary ENI
eni-062703f14eb07a4ce.

The SG has no TCP ingress CIDR rule for 10.244.0.0/16. Its only broad
inbound rule is UDP 0-65535 from 0.0.0.0/0; TCP allows only control-plane
ports and node-SG references. A returned TCP SYN-ACK/response arriving from a
websites pod has source 10.244.x.x, which does not match the node-SG
reference. Therefore the worker ENI blocks the return TCP traffic even if the
gateway can forward it.

Ruled out

  • Subnet NACL acl-02fa27459f1966d3c allows all IPv4 ingress and egress.
  • No Kubernetes NetworkPolicy selects the temporary probe namespace.
  • No SecurityGroupPolicy CR exists for the workload.

Required test configuration

The following changes were applied for the current validation:

  1. Disabled SourceDestCheck on both active gateway ENIs:

    eni-0093acf4040e51435
    eni-0ae05cfe45d0d09cd
    
  2. Added this ingress rule to the node/worker ENI SG
    sg-0ba130fce0ffa3ae3:

    protocol: all
    source:   10.244.0.0/16
    purpose:  Submariner websites-stage-omni pod CIDR
    

The same pinned test then succeeded:

connector: 10.151.4.47 on ip-10-151-4-224
listener:  10.244.4.87 on omni-worker-1

Ncat: Connected to 10.244.4.87:8080.
Ncat: 12 bytes sent, 0 bytes received in 0.02 seconds.

The AWS gateway still selected the expected CNI/VPC route:

10.151.4.47 via 10.151.2.1 dev ens5

Persistent configuration for new clusters

Treat these settings as cloud infrastructure configuration, ideally managed in
Terraform/EKS node-group provisioning rather than added ad hoc:

  1. Every possible Submariner gateway EC2 instance: disable
    SourceDestCheck on every attached ENI. If gateway failover can select
    multiple nodes, configure every gateway candidate before enabling it.
  2. AWS worker/node ENI Security Group: add an ingress rule for each remote
    cluster's pod CIDR, with all protocols. Cross-cluster traffic includes
    TCP, UDP, ICMP, and ephemeral reply ports; limiting the rule to a test TCP
    port makes normal Submariner traffic incomplete.
  3. Globalnet: if enabled, allow the remote cluster's Globalnet CIDR as
    well, because it becomes the packet source after translation.
  4. Do not add a rule only because of a remote service CIDR. A service CIDR
    is normally a destination virtual IP; return packets originate from remote
    pod IPs. The remote pod CIDR (and Globalnet CIDR, if any) is what AWS SG
    ingress must allow.
  5. Keep the cable transport rule (UDP 4500/NAT-T for Libreswan in this setup)
    between gateway public/private endpoints as a separate requirement.

For each newly joined cluster, validate both layers:

AWS worker PBR table → remote pod CIDR via vx-submariner
AWS ingress SG         ← remote pod/global CIDR
AWS gateway ENIs       SourceDestCheck=false

Cleanup

Temporary namespace subm-pbr-diagnosis was created on both clusters for the
pinned probe. It was deleted on AWS. The websites deletion could not be
submitted because the local DNS resolver could not resolve the Kubernetes API
endpoint; delete it after access is restored.

@yboaron

yboaron commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Hi @sanek9!

Thanks for the detailed lab report and for implementing the ConfigMap approach - it's great to see it validated in your environment!

Honestly, I'm finding it challenging to follow all the requirements and changes across the discussion. To help both the broader community and me understand and provide feedback, could you provide a top-down overview of what you're trying to achieve?

What Would Help

  1. Use Case Summary:
  • Cluster type: EKS with what configuration?
  • CNI: what CNI is used? what bout other CNIs? AWS VPC CNI in which mode?
  • Deployment constraints: Any specific requirements (Karpenter, node types, etc.)
  • What problems are you solving: List the specific connectivity issues
  • Other Prerequisites needed
  1. Required Changes - broken Down:

It seems like there are multiple independent problems here:

Problem A: Worker egress routing

  • Issue: AWS VPC CNI uses custom PBR tables (2, 3, etc.)

Problem B: Worker ingress routing

Problem C: AWS infrastructure prerequisites

  • Issue: SourceDestCheck + Security Groups block traffic

Other problems? DNS/CoreDNS related issues?

Can you send a clear top-down explanation as a Submariner enhancement proposal?
It should

  • Help other maintainers understand the scope
  • Make it easier for other AWS users to validate if this solves their issues

Bottom line, we want to support this work, but let's organize it so the community can engage effectively. Does that make sense?

Thanks again for your persistence on this!

@sanek9

sanek9 commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Hi @yboaron!

Thank you for your patience and understanding. To be honest, I've started getting a bit confused by all of this myself.

I will try to draft the enhancement proposals. I don't know yet how long it will take me, but as I understand it, I need to create 3 enhancement proposals:

  • For aws-vpc-cni (I suspect this should be something more generic so it works across different clouds, because the issues seem similar. I suppose I will insist on a synchronous datapath).
  • For the --coredns-custom-configmap-key flag.
  • For Cilium.

I will need some time for this.... so I'll submit them as they are ready...

@yboaron

yboaron commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Hi @sanek9!

Thanks for understanding, appreciate your willingness to document this properly

Take whatever time you need, getting it right is more important than speed.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further
activity occurs. Thank you for your contributions.

@github-actions github-actions Bot added the stale label Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants