You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i use metallb bgp mode and calico. early_snat does not work for me (outbound traffic do no snat back) but v0.1.4 works fine. may be should have some option for that? if you tell me how to pass an option (during install??) i can prepare pull request
Hey, thanks for report. I think we can introduce an option to choice the method.
Could you please provide your calico configuration for better understanding cause of the problem?
This is very likely the same class of issue we just fixed on the cozystack side in cozystack/cozystack#2357.
Since v0.2.0 cozy-proxy performs stateless NAT in the raw table (early_snat chain), which runs before conntrack. In a plain kube-proxy (iptables/IPVS) setup — which is exactly what RKE2 + Calico uses — kube-proxy also installs its own rules for LoadBalancer services, and those rules end up interfering with cozy-proxy's NAT (most visibly on the outbound path, which matches your "outbound traffic does no SNAT back" symptom). In v0.1.4 we worked in the nat table, so the ordering happened to line up differently and the conflict didn't surface.
The standard Kubernetes way to tell kube-proxy "ignore this service, someone else handles it" is the service.kubernetes.io/service-proxy-name label. Could you try adding this label to your LoadBalancer service and retest?
kube-proxy creates no iptables/IPVS entries for the service at all
MetalLB BGP advertisement is unaffected
cozy-proxy's raw-table rules become the only thing doing NAT, no conflicts
If that resolves it for you, I think we should document this as the required setup for the plain-kube-proxy case (and possibly default to it in the chart / examples). If it doesn't help, please share nft list ruleset and iptables-save from the node while traffic is flowing — we'll dig further.
Activity
kvaps commentedon Sep 9, 2025
Hey, thanks for report. I think we can introduce an option to choice the method.
Could you please provide your calico configuration for better understanding cause of the problem?
nikitos commentedon Sep 12, 2025
all just default on rancher rke2 cluster. only added metallb helm and this: (could not make it looks better :( )
apiVersion: metallb.io/v1beta1 kind: IPAddressPool metadata: name: real-pool namespace: metallb-system spec: addresses: - <ip>apiVersion: metallb.io/v1beta2 kind: BGPPeer metadata: name: sample namespace: metallb-system spec: myASN: 64512 peerASN: 65000 peerAddress: 10.20.30.1apiVersion: metallb.io/v1beta1 kind: BGPAdvertisement metadata: name: example namespace: metallb-system spec: ipAddressPools: - real-poolkvaps commentedon Apr 21, 2026
Hi Andriyanov Nikita (@nikitos), thanks for the details.
This is very likely the same class of issue we just fixed on the cozystack side in cozystack/cozystack#2357.
Since v0.2.0 cozy-proxy performs stateless NAT in the
rawtable (early_snatchain), which runs before conntrack. In a plain kube-proxy (iptables/IPVS) setup — which is exactly what RKE2 + Calico uses — kube-proxy also installs its own rules for LoadBalancer services, and those rules end up interfering with cozy-proxy's NAT (most visibly on the outbound path, which matches your "outbound traffic does no SNAT back" symptom). In v0.1.4 we worked in thenattable, so the ordering happened to line up differently and the conflict didn't surface.The standard Kubernetes way to tell kube-proxy "ignore this service, someone else handles it" is the
service.kubernetes.io/service-proxy-namelabel. Could you try adding this label to your LoadBalancer service and retest?With this label:
If that resolves it for you, I think we should document this as the required setup for the plain-kube-proxy case (and possibly default to it in the chart / examples). If it doesn't help, please share
nft list rulesetandiptables-savefrom the node while traffic is flowing — we'll dig further.feat: select services by service-proxy-name label