<p>I have a k8s cluster which contains 2 nodes. And in the cluster I deployed 2 pods for the same application. Due to some reason I have to deploy a service (NodePort IP) for each pod, so totally I have 2 services the application, for example the service NodePort IP is 192.142.1.11 and 192.142.1.12. And use these 2 ips I can access the application from any node.</p>
<p>Now I am going to use keepalived to set up HA for the application. So:</p>
<ol>
<li>What's the best practice to install the keepalived service? On each k8s node or deploy it as pod?</li>
<li>How to configure the <code>interface</code> in the <strong>keepalived.conf</strong> file? You know the NodePort ips are configured on <em>kube-ipvs0</em> interface created by k8s and its status is down. Seems it cannot be used as the interface in keepalived.conf. Should I use the Node external interface if I start keepalived service on each node?</li>
</ol>
<p>Thanks for your help.</p>

TangHongWan
<p>If your final goal is masters HA / users  service load balancing in on-prem environment, then you can take a look on this two project:</p>
<p><a href="https://kube-vip.io/" rel="nofollow noreferrer">Kubevip</a>: can do both (HA masters + LoadBalancer type for user workload).</p>
<p><a href="https://github.com/metallb/metallb" rel="nofollow noreferrer">Metallb</a>:
user workload LoadBalancer</p>
