Hi,
I’m trying to understand the (security) implications of these various bindings.
To my understanding
-
127.0.0.1
Would effectively prevent traffic to the pod -
0.0.0.0
Would allow traffic to the pod (on all interfaces) -
$POD_IP
Would allow “normal” traffic to the pod but would preventkubectl port-forward
to work (see also
https://github.com/kubernetes/kubernetes/issues/72597 )
It seems to me that 0.0.0.0
is the most convenient option to open a server as it allows for easy (network) debugging via kubectl port-forward
Binding on $POD_IP
seems to me the “correct” way but I don’t have any strong arguments. It feels that it would help reduce the attack surface but I’m far from being a Kubernetes/Networking expert.
Does anyone have some insights into this topic? Any “opinion” pieces that go beyond the usual "127.0.0.1
vs 0.0.0.0
" discussion? Any material I can read? Any other forum/website more appropriate for this discussion?
Thank you,
Oliver