<p>How can I configure a LoadBalancer to retrieve a ephemeral rather than static IP?</p>

<p>I need this so I don't have to WAIT FOR GOOGLE TO INCREASE THE QUOTA FROM 1 IP ADDRRESS... (It's been a long day...)</p>

<pre><code>  Normal   EnsuringLoadBalancer        3m (x7 over 8m)  service-controller  Ensuring load balancer
  Warning  CreatingLoadBalancerFailed  3m (x7 over 8m)  service-controller  Error creating load balancer (will retry): failed to ensure load balancer for service default/subzero-react: failed to ensure a static IP for load balancer (*****************(default/subzero-react)): error creating gce static IP address: googleapi: Error 403: Quota 'STATIC_ADDRESSES' exceeded. Limit: 1.0 in region us-central1., quotaExceeded
</code></pre>

<p>Upon removing the <code>loadBalancerIp</code> field and recreating the service, it still remains in pending.</p>

<p>This is the output of <code>kubectl get service ****** -o yaml</code>:</p>

<pre><code>kubectl get service **** -o yaml
apiVersion: v1
kind: Service
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"app":"api"},"name":"subzero-react","namespace":"default"},"spec":{"ports":[{"name":"http","port":80}],"selector":{"app":"initial-pp3subzero"},"type":"LoadBalancer"}}
  creationTimestamp: 2018-11-19T18:04:24Z
  labels:
    app: api
  name: *****************
  namespace: default
  resourceVersion: "584211"
  selfLink: /api/v1/namespaces/default/services/**********
  uid: 8c140d40-ec25-11e8-b7b3-42010a8000c2
spec:
  clusterIP: 10.7.242.176
  externalTrafficPolicy: Cluster
  ports:
  - name: http
    nodePort: 31853
    port: 80
    protocol: TCP
    targetPort: 80
  selector:
    app: ******************
  sessionAffinity: None
  type: LoadBalancer
status:
  loadBalancer: {}
</code></pre>

<p>To not assign a static IP on a GCP load balancer with Kubernetes (default behavior) you generally don't need to specify anything in the <code>loadBalancerIP</code> service spec as described <a href="https://github.com/GoogleCloudPlatform/kubernetes-engine-samples/blob/master/hello-app/manifests/helloweb-service-static-ip.yaml" rel="nofollow noreferrer">here</a> and <a href="https://cloud.google.com/kubernetes-engine/docs/tutorials/configuring-domain-name-static-ip" rel="nofollow noreferrer">here</a>.</p>

<p>You can delete your service and re-create it without the <code>loadBalancerIP</code> or you can patch it:</p>

<pre><code>$ kubectl patch service &lt;service-name&gt; -p '{"spec": { "loadBalancerIP": null }}'
</code></pre>
