<p>I have two container deployed in kubernates, each container has stateful application which is tightly coupled with container IP &amp; I need to have communication between two (application is not trusting service ip). Therefore I need to assign static IP to container.  Could anyone help me here ?
Thanks in advance</p>

<p>A static IP cannot be assigned to a Pod.</p>

<p>Withing StatefulSet, you can refer to a <a href="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-network-id" rel="nofollow noreferrer">stable network ID</a></p>

<p>If you are using GKE for your cluster, it supports <code>loadBalancerIP</code>. So, at some point, you can rely on this service. Just mark the auto-assigned IP as static first.</p>

<pre><code>apiVersion: v1
kind: Service
spec:
  type: LoadBalancer
  loadBalancerIP: 10.10.10.10
</code></pre>
