<p>In Azure, i am using helm to deploy a service (type=loadbalancer)</p>
<p>Below is the manifest file</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: {{ template &quot;app.fullname&quot; . }}-service-lb
  labels:
    app: {{ template &quot;app.fullname&quot; . }}-service-lb
  annotations:
    service.beta.kubernetes.io/azure-load-balancer-internal: &quot;true&quot;
spec:
  type: LoadBalancer
  ports:
    - port: {{.Values.appServPort}}
      nodePort: {{.Values.lbPort}}
      protocol: TCP
  selector:
    app: {{ template &quot;app.fullname&quot; . }}-service
</code></pre>
<p>Is it possible to tell kubernetes cluster to use a specific ip every time as an External IP. Whenever I deploy the service?</p>
<p>/*-- EDITED-- */</p>
<p>Every time the loadbalancer service is deployed, a new External ip is allocated, in my case wanted to specify to use the same ip, and assume that ip address is not used within the network.</p>
<p>/*---- */</p>
<p>My understanding is the Kubernetes cluster will allocate an External Ip everytime its deployed, it not specified in the manifest file.</p>
<p>There is an Azure documentation which details on how to use a static Ip within the manifest file and <a href="https://learn.microsoft.com/en-us/azure/aks/static-ip" rel="nofollow noreferrer">demo link</a>.</p>

Tim
<p>I'm just quoting from the <a href="https://learn.microsoft.com/en-us/azure/aks/internal-lb#specify-an-ip-address" rel="nofollow noreferrer">docs</a></p>
<blockquote>
<p>If you would like to use a specific IP address with the internal load
balancer, add the loadBalancerIP property to the load balancer YAML
manifest. In this scenario, the specified IP address must reside in
the same subnet as the AKS cluster and must not already be assigned to
a resource. For example, you shouldn't use an IP address in the range
designated for the Kubernetes subnet.</p>
</blockquote>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: internal-app
  annotations:
    service.beta.kubernetes.io/azure-load-balancer-internal: &quot;true&quot;
spec:
  type: LoadBalancer
  loadBalancerIP: 10.240.0.25
  ports:
  - port: 80
  selector:
    app: internal-app
</code></pre>
