I'm working in kube-proxy development and I'm in the stage of understanding the purpose and execution of kube-proxy.
I know that kube-proxy will add iptables rules to enable user to access the exposed pods (which is kubernetes service in iptables mode).
what makes me wonder, is the fact that those rules are added in the host node where a pod of kube-proxy is running, and it's not clear how this pod is capable of accessing those privileges on the host node.
I have took a look on the code of kubernetes with no success to find this specific part, so if you have any idea, resource, or documentation that would help me to figure this out it would be appreciated.