How can I create Kubernetes load balancer with an ephemeral IP in GKE?











up vote
0
down vote

favorite












How can I configure a LoadBalancer to retrieve a ephemeral rather than static IP?



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...)



  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


Upon removing the loadBalancerIp field and recreating the service, it still remains in pending.



This is the output of kubectl get service ****** -o yaml:



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: {}









share|improve this question




























    up vote
    0
    down vote

    favorite












    How can I configure a LoadBalancer to retrieve a ephemeral rather than static IP?



    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...)



      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


    Upon removing the loadBalancerIp field and recreating the service, it still remains in pending.



    This is the output of kubectl get service ****** -o yaml:



    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: {}









    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      How can I configure a LoadBalancer to retrieve a ephemeral rather than static IP?



      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...)



        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


      Upon removing the loadBalancerIp field and recreating the service, it still remains in pending.



      This is the output of kubectl get service ****** -o yaml:



      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: {}









      share|improve this question















      How can I configure a LoadBalancer to retrieve a ephemeral rather than static IP?



      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...)



        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


      Upon removing the loadBalancerIp field and recreating the service, it still remains in pending.



      This is the output of kubectl get service ****** -o yaml:



      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: {}






      kubernetes google-cloud-platform google-kubernetes-engine kubernetes-service






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 20 at 8:57

























      asked Nov 19 at 18:14









      Chris Stryczynski

      3,51242657




      3,51242657
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          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 loadBalancerIP service spec as described here and here.



          You can delete your service and re-create it without the loadBalancerIP or you can patch it:



          $ kubectl patch service <service-name> -p '{"spec": { "loadBalancerIP": null }}'





          share|improve this answer





















          • I deleted it and recreated it without that field but it's been still 14h and still pending. I did initially try to add a static ip with loadBalancerIp - but this has definitely been removed now.
            – Chris Stryczynski
            Nov 20 at 8:54










          • Please check your Quotas page and see if you're hitting any of the "In-use IP addresses" limits.
            – Asif Tanwir
            Nov 23 at 23:25











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53380452%2fhow-can-i-create-kubernetes-load-balancer-with-an-ephemeral-ip-in-gke%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote













          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 loadBalancerIP service spec as described here and here.



          You can delete your service and re-create it without the loadBalancerIP or you can patch it:



          $ kubectl patch service <service-name> -p '{"spec": { "loadBalancerIP": null }}'





          share|improve this answer





















          • I deleted it and recreated it without that field but it's been still 14h and still pending. I did initially try to add a static ip with loadBalancerIp - but this has definitely been removed now.
            – Chris Stryczynski
            Nov 20 at 8:54










          • Please check your Quotas page and see if you're hitting any of the "In-use IP addresses" limits.
            – Asif Tanwir
            Nov 23 at 23:25















          up vote
          1
          down vote













          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 loadBalancerIP service spec as described here and here.



          You can delete your service and re-create it without the loadBalancerIP or you can patch it:



          $ kubectl patch service <service-name> -p '{"spec": { "loadBalancerIP": null }}'





          share|improve this answer





















          • I deleted it and recreated it without that field but it's been still 14h and still pending. I did initially try to add a static ip with loadBalancerIp - but this has definitely been removed now.
            – Chris Stryczynski
            Nov 20 at 8:54










          • Please check your Quotas page and see if you're hitting any of the "In-use IP addresses" limits.
            – Asif Tanwir
            Nov 23 at 23:25













          up vote
          1
          down vote










          up vote
          1
          down vote









          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 loadBalancerIP service spec as described here and here.



          You can delete your service and re-create it without the loadBalancerIP or you can patch it:



          $ kubectl patch service <service-name> -p '{"spec": { "loadBalancerIP": null }}'





          share|improve this answer












          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 loadBalancerIP service spec as described here and here.



          You can delete your service and re-create it without the loadBalancerIP or you can patch it:



          $ kubectl patch service <service-name> -p '{"spec": { "loadBalancerIP": null }}'






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 20 at 1:44









          Rico

          25.1k94864




          25.1k94864












          • I deleted it and recreated it without that field but it's been still 14h and still pending. I did initially try to add a static ip with loadBalancerIp - but this has definitely been removed now.
            – Chris Stryczynski
            Nov 20 at 8:54










          • Please check your Quotas page and see if you're hitting any of the "In-use IP addresses" limits.
            – Asif Tanwir
            Nov 23 at 23:25


















          • I deleted it and recreated it without that field but it's been still 14h and still pending. I did initially try to add a static ip with loadBalancerIp - but this has definitely been removed now.
            – Chris Stryczynski
            Nov 20 at 8:54










          • Please check your Quotas page and see if you're hitting any of the "In-use IP addresses" limits.
            – Asif Tanwir
            Nov 23 at 23:25
















          I deleted it and recreated it without that field but it's been still 14h and still pending. I did initially try to add a static ip with loadBalancerIp - but this has definitely been removed now.
          – Chris Stryczynski
          Nov 20 at 8:54




          I deleted it and recreated it without that field but it's been still 14h and still pending. I did initially try to add a static ip with loadBalancerIp - but this has definitely been removed now.
          – Chris Stryczynski
          Nov 20 at 8:54












          Please check your Quotas page and see if you're hitting any of the "In-use IP addresses" limits.
          – Asif Tanwir
          Nov 23 at 23:25




          Please check your Quotas page and see if you're hitting any of the "In-use IP addresses" limits.
          – Asif Tanwir
          Nov 23 at 23:25


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53380452%2fhow-can-i-create-kubernetes-load-balancer-with-an-ephemeral-ip-in-gke%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Create new schema in PostgreSQL using DBeaver

          Deepest pit of an array with Javascript: test on Codility

          Costa Masnaga