<p>I have a simple service</p>

<pre><code>apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
  name: nginx-deployment
spec:
  selector:
    matchLabels:
      app: nginx
  replicas: 2 # tells deployment to run 2 pods matching the template
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.7.9
        ports:
        - containerPort: 80
</code></pre>

<p>And here is how my cluster looks like. Pretty simple.</p>

<pre><code>$kubectl get pods -o wide
NAME                                READY   STATUS    RESTARTS   AGE   IP           NODE                      NOMINATED NODE   READINESS GATES
my-shell-95cb5df57-cdj4z            1/1     Running   0          23m   10.60.1.32   aks-nodepool-19248108-0   &lt;none&gt;           &lt;none&gt;
nginx-deployment-76bf4969df-58d66   1/1     Running   0          36m   10.60.1.10   aks-nodepool-19248108-0   &lt;none&gt;           &lt;none&gt;
nginx-deployment-76bf4969df-jfkq7   1/1     Running   0          36m   10.60.1.21   aks-nodepool-19248108-0   &lt;none&gt;           &lt;none&gt;
$kubectl get services -o wide
NAME               TYPE           CLUSTER-IP   EXTERNAL-IP   PORT(S)        AGE     SELECTOR
internal-ingress   LoadBalancer   10.0.0.194   10.60.1.35    80:30157/TCP   5m28s   app=nginx-deployment
kubernetes         ClusterIP      10.0.0.1     &lt;none&gt;        443/TCP        147m    &lt;none&gt;
</code></pre>

<pre><code>$kubectl get rs -o wide
NAME                          DESIRED   CURRENT   READY   AGE   CONTAINERS   IMAGES        SELECTOR
my-shell-95cb5df57            1         1         1       23m   my-shell     ubuntu        pod-template-hash=95cb5df57,run=my-shell
nginx-deployment-76bf4969df   2         2         2       37m   nginx        nginx:1.7.9   app=nginx,pod-template-hash=76bf4969df
</code></pre>

<p>I see I have 2 pods wiht my nginx app. I want to be able to send a request from any other new pod to either one of them. If one crashes, I want to still be able to send this request.
In the past I used a load balancer for this. The problem with load balancers is that they open up a public IP and int this specific scenario, I don't want a public IP anymore. I want this service to be invoked by other pods directly, without a public IP.</p>

<p>I tried to use an internal load balancer.</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: internal-ingress
  annotations:
    service.beta.kubernetes.io/azure-load-balancer-internal: "true"
    service.beta.kubernetes.io/azure-load-balancer-internal-subnet: "my-subnet"
spec:
  type: LoadBalancer
  loadBalancerIP: 10.60.1.45
  ports:
  - port: 80
  selector:
    app: nginx-deployment
</code></pre>

<p>The problem is that it does not get an IP in my <code>10.60.0.0/16</code> network like it is described here: <a href="https://learn.microsoft.com/en-us/azure/aks/internal-lb#specify-a-different-subnet" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/azure/aks/internal-lb#specify-a-different-subnet</a>
I get this never ending <code>&lt;pending&gt;</code>.</p>

<pre><code>kubectl get services -o wide
NAME               TYPE           CLUSTER-IP   EXTERNAL-IP   PORT(S)        AGE    SELECTOR
internal-ingress   LoadBalancer   10.0.0.230   &lt;pending&gt;     80:30638/TCP   15s    app=nginx-deployment
kubernetes         ClusterIP      10.0.0.1     &lt;none&gt;        443/TCP        136m   &lt;none&gt;
</code></pre>

<p>What am I missing? How to troubleshoot? Is it even possible to have pod to service communication?</p>

ddreian
<p>From the message you provide, it seems you want to use a special private IP address which is in the subnet that the same as the AKS cluster use. I think the possible reason is that the special IP address which you want to use is already assigned by the AKS, it means you cannot use it.</p>

<p><strong>Troubleshooting</strong></p>

<p>So you need to guide to the Vnet which your AKS cluster used and check if the IP address is already in use. Here is the screenshot:</p>

<p><a href="https://i.stack.imgur.com/2jXl8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2jXl8.png" alt="enter image description here"></a></p>

<p><strong>Solution</strong></p>

<p>Choose an IP address that is not assigned by the AKS from the subnet the AKS used. <strong>Or</strong> do not use a special one, let the AKS assign your load balancer dynamic. Then change your YAML file like below:</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: internal-ingress
  annotations:
    service.beta.kubernetes.io/azure-load-balancer-internal: "true"
spec:
  type: LoadBalancer
  ports:
  - port: 80
  selector:
    app: nginx-deployment
</code></pre>
