3 ms·
nft and iptables are both packet filters. What is your use case?
by gerdesj 5y ago
nft and iptables are both packet filters. What is your use case?
- betaby 5y agoIt's a more operational question. In a year or two I plan to have all newly deployed servers with nft instead of iptables. So I would naturally expect to use the same nft commands to troubleshoot 'classic' servers and k8s nodes what sit on the same 'classic' servers - we run k8s on bare hardware.
- paulfurtado 5y agoKubernetes implements load balancing via iptables probability rules. It creates "magic" static IPs on all kube nodes for ClusterIP services and makes iptables randomly select backend pods, making for a highly efficient zero-userspace load balancer. That gets less efficient with more rules due to the linearity of iptables. It also has an alternative implementation using ipvs, which is theoretically more efficient but has faced a number of issues over the years. Kubernetes also has network security policy features for firewalling, that piece is implemented by plugins which do whatever they want though. At this time, kubernetes requires you to be using iptables instead of nftables for all of this, so it will be interesting to see it running on iptables-free servers in the future.