-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Return traffic can be denied for a short duration once the policies are reconciled on a new pod #345
Comments
NetPol are always asynchronously reconciled. What makes standard mode so special here compared to strict mode? Can you please elaborate on the technical side a bit. |
Secondly I believe the In Eventually all of |
@youwalther65 In strict mode, we do default deny before policies are applied on the first pod, so no egress traffic goes out of the pod before policies were applied. So above issue will not happen where response packet will be denied as entry is missing in conntrack table for traffic that egressed out of pod before applying policies |
@m00lecule We are looking into improving the user experience for strict mode. This is something we are prioritizing. We will provide more details soon |
Syncing here as well aws/amazon-vpc-cni-k8s#3206 (comment) |
@Pavani-Panakanti The issue is still present after upgrading vpc-cni to |
Looking into this. Will add an update soon |
What happened:
In standard mode, we do a default allow at pod startup and all traffic is allowed before policies are reconciled. It takes 1-2secs for the policies to be reconciled on the new pod. Once the network policy reconciliation happens, we start tracking the flows in conntrack table. For return traffic we check if entry is present in conntrack table and allow it accordingly. For traffic which exited the pod before network policies were applied and return traffic came after policies were applied, the return traffic will be denied as entry is not tracked in conntrack table
As a mitigation, 2-5secs delay can be added at the pod startup using init container. As a result, traffic will start going out of the pod only after network policies were applied and there will be no denies in the return traffic
We are actively working on fixing this issue, so that cx can use standard mode without the need to add sleep at pod startup. Fix for this issue can be tracked here
Please note that this issue happens only with standard mode and not in strict mode
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
kubectl version
):cat /etc/os-release
):uname -a
):The text was updated successfully, but these errors were encountered: