<p>I have a kubernetes cluster with calico. I want to prevent routing through external interfaces to reach the internal <code>clusterIPs</code> of the cluster. I am planning to use <a href="https://docs.projectcalico.org/security/tutorials/protect-hosts" rel="nofollow noreferrer">this</a>.</p>
<p>For which interfaces should the <code>hostendpoint</code> be defined? Is it only the interface on which the Kubernetes was advertised or for all the external interfaces in the cluster?</p>

Parvathy Mohan
<p>You should define a HostEndpoint for every network interface that you want to block/filter traffic on, and for every node in your cluster as well, since a given HostEndpoint of this type only protects a single interface on a single node.</p>
<p>Also, since defining a HostEndpoint in Calico will immediately block ALL network traffic to that node and network interface (except for a few &quot;failsafe&quot; ports by default), make sure to have your network policies in place BEFORE you define your HostEndpoints, so the traffic you want to allow will be allowed.  You will want to consider if you need to allow traffic to/from the kubelet on each node, to/from your DNS servers, etc.</p>
<p>A common pattern is to use HostEndpoints for public network interfaces since those are the most exposed, and not for you private network interface since ideally those are used for pod to pod and node to node traffic that your Kubernetes cluster needs in order to function properly.</p>
