<p>I ran into some trouble getting an external ip address after posting the following json object (variables excluded):</p>

<pre><code>$json= '{
          "kind": "Service",
          "apiVersion": "v1",
          "metadata": {
            "name": ""
          },
          "spec": {
            "ports": [{
              "port": 80,
              "targetPort": 80
            }],
            "selector": {
              "app": ""
            },
            "type": "LoadBalancer"
          }
}';
</code></pre>

<p>The service is created but no external ip is ever given.</p>

<p>Unable to determine where the issue lay, I proceeded to install a clean copy of kubernetes (and the cluster it is defined to install) using the following command provided in the documentation (V1 kubernetes/examples/simple-nginx.md):</p>

<pre><code>curl -sS https://get.k8s.io | bash
</code></pre>

<p>This of course set things up automatically. I then ran the following commands to test if the LoadBalancer function was working:</p>

<pre><code>kubectl run my-nginx --image=nginx --replicas=2 --port=80
</code></pre>

<p>After running <code>kubectl get pods</code> to confirm that they were ready, I exposed the service:</p>

<pre><code>kubectl expose rc my-nginx --port=80 --type=LoadBalancer
</code></pre>

<p>I then ran <code>kubectl get service</code> for the past few minutes, and no public ip is being provided..</p>

<p>That cant be right?</p>

<p><strong>EDIT</strong></p>

<pre><code>kubectl get services  

NAME         LABELS                                    SELECTOR       IP(S)          PORT(S)
kubernetes   component=apiserver,provider=kubernetes   &lt;none&gt;         10.0.0.1       443/TCP
my-nginx     run=my-nginx                              run=my-nginx   10.0.136.163   80/TCP


kubectl get service my-nginx -o yaml  

apiVersion: v1
kind: Service
metadata:
  creationTimestamp: 2015-08-11T11:44:02Z
  labels:
    run: my-nginx
  name: my-nginx
  namespace: default
  resourceVersion: "1795"
  selfLink: /api/v1/namespaces/default/services/my-nginx
  uid: 434751be-401e-11e5-a219-42010af0da43
spec:
  clusterIP: 10.x.xxx.xxx
  ports:
  - nodePort: 31146
    port: 80
    protocol: TCP
    targetPort: 80
  selector:
    run: my-nginx
  sessionAffinity: None
  type: LoadBalancer
status:
  loadBalancer: {}
</code></pre>

<p>After running (Thanks GameScripting):</p>

<pre><code>kubectl describe service my-nginx
</code></pre>

<p>I saw the following error:</p>

<pre><code>FirstSeen               LastSeen            Count   From            SubobjectPath   Reason              Message
  Tue, 11 Aug 2015 14:00:00 +0200   Tue, 11 Aug 2015 14:02:41 +0200 9   {service-controller }           creating loadbalancer failed    failed to create external load balancer for service default/my-nginx: googleapi: Error 403: Quota 'FORWARDING_RULES' exceeded.  Limit: 15.0
</code></pre>

<p>After manually removing the Forwarding Rules Under "Networking->Load Balancing->Network Load Balancing" (Or you can use <code>gcloud compute forwarding-rules delete</code>) I was able to get public Ip's again. It seems somehow the forwarding rules werent deleted and reached the limit. It is strange as when I ran <code>Kubectl stop service</code> it removed the forwarding rule for me.</p>
