-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Pod Connectivity Issue: Using Port Names Instead of Port Numbers in Network Policies #7391
Comments
It seems strange that it doesn't work only when the port is specified with name. |
Could you give more info of your setup? How I read from the policy you are allowing only the traffic from traefik to the web service (I imagine that your two replicas deployment is the web service) and also the egress traffic allowed is to who? |
Yes, the application is a web service that requires access to a PostgreSQL and a Postfix instance located outside of our cluster. To enable this access, we have created two egress rules specifically for these instances. |
How do you access the service? Did you create an Ingress resource? |
Yeah there is a Ingress resource. But it not only occurs with traefik. |
Are you contacting the web service from a pod or from a node? Are you using the Traefik service IP? |
Validated on branch with commit / version
Infrastructure [X ] Cloud
Cluster Configuration:
Config.yaml:
Testing Steps:
Replication Results: k3s version used for replication:
Validation Results:
|
Environmental Info:
K3s Version:
Node(s) CPU architecture, OS, and Version:
Cluster Configuration:
--prefer-bundled-bin
flag is setDescribe the bug:
Sometimes it's not possible to establish a connection with one of the replicas of a deployment, when there are more than one, due to activated network policies. This issue occurs only when the network policy has the port name set in our case
http
. However, when the port number is specified, the connection works without any problems. This behavior is not consistent, as it doesn't always happen. Despite checking the iptables rules, no relevant differences were found between the two cases.The issue only occurs when there are multiple replicas, as with a single pod the issue is not observed.
Steps To Reproduce:
Custom systemd unit server:
k3s.service.env
:Custom systemd unit agent:
k3s.service.env
:Expected behavior:
A connection is always possible with more than 1 replica when the port name is set in the network polices.
Actual behavior:
With more than 1 replica, its sometime not possible to establish a connection with one of them.
The text was updated successfully, but these errors were encountered: