Skip to content
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

The firewall affects pods from accessing other node services #1834

Open
hardship1 opened this issue Dec 6, 2023 · 6 comments
Open

The firewall affects pods from accessing other node services #1834

hardship1 opened this issue Dec 6, 2023 · 6 comments

Comments

@hardship1
Copy link

hardship1 commented Dec 6, 2023

Steps to Reproduce (for bugs)

1.turned off the firewall.
2.then deployed kubernetes and flannel.
3.start the firewall and then turn it off.
4.Pods cannot access other nodes' networks

Expected Behavior

Pods can access pods of other nodes,When the firewall changes

Current Behavior

Pods cannot access other nodes' networks, When the firewall changes

I'm guessing that iptables changed after the firewall was turned off, but flannel didn't refresh the iptables rule
flannel version is 0.13.1-rc2

@thomasferrandiz
Copy link
Contributor

Did you configure the firewall properly to work with flannel?

@hardship1
Copy link
Author

I turned off the firewall and just started flannel working normally.
Then after the firewall is started and shut down again, the pod will not be able to access other nodes, and when the pod is restarted, it will be able to access other nodes, and Flannel will not check the iptables rules by itself? Instead of deleting a pod, create a pod rule.

@hardship1
Copy link
Author

A change in the firewall state causes the iptables rule to change, but Flannel doesn't do anything about it

@thomasferrandiz
Copy link
Contributor

flannel only creates or deletes iptables rules on specific events like the creation/deletion of a pod or when a node is added to the cluster.
Otherwise we assume that the firewall is already configured as required in the documentation when flannel starts and that nothing is modified afterwards.
If you modify the firewall or run another program that interferes with flannel's iptables rules then your cluster can end up in a broken state.

@hardship1
Copy link
Author

Thanks, if I want to rewrite the iptables rule when I restart the firewall, any suggestions? or does flannel provide a refresh interface?

@thomasferrandiz
Copy link
Contributor

the only solution I see is that you add your own rules in way that does not interfere with flannel's.
There is no way to tell flannel to refresh the rules apart from restarting it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants