How can gke create a reserved public or private gcp address for use in a LoadBalancer Service?












0















is there support in gke or helm to have k8s create a reserved GCP address for me that I will be using in externalIPs?
https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address
https://cloud.google.com/compute/docs/ip-addresses/reserve-static-internal-ip-address



I can script it myself, but Id like this reservation to be part of the kuberenetes config itself instead of having to create it outside of the k8s config with my own scripts or manually



perhaps the new k8s Service Catalog can provision a reserved static IP for me?










share|improve this question





























    0















    is there support in gke or helm to have k8s create a reserved GCP address for me that I will be using in externalIPs?
    https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address
    https://cloud.google.com/compute/docs/ip-addresses/reserve-static-internal-ip-address



    I can script it myself, but Id like this reservation to be part of the kuberenetes config itself instead of having to create it outside of the k8s config with my own scripts or manually



    perhaps the new k8s Service Catalog can provision a reserved static IP for me?










    share|improve this question



























      0












      0








      0








      is there support in gke or helm to have k8s create a reserved GCP address for me that I will be using in externalIPs?
      https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address
      https://cloud.google.com/compute/docs/ip-addresses/reserve-static-internal-ip-address



      I can script it myself, but Id like this reservation to be part of the kuberenetes config itself instead of having to create it outside of the k8s config with my own scripts or manually



      perhaps the new k8s Service Catalog can provision a reserved static IP for me?










      share|improve this question
















      is there support in gke or helm to have k8s create a reserved GCP address for me that I will be using in externalIPs?
      https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address
      https://cloud.google.com/compute/docs/ip-addresses/reserve-static-internal-ip-address



      I can script it myself, but Id like this reservation to be part of the kuberenetes config itself instead of having to create it outside of the k8s config with my own scripts or manually



      perhaps the new k8s Service Catalog can provision a reserved static IP for me?







      kubernetes google-cloud-platform google-compute-engine gke






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 26 '18 at 15:57







      red888

















      asked Nov 25 '18 at 21:25









      red888red888

      4,900845102




      4,900845102
























          1 Answer
          1






          active

          oldest

          votes


















          0














          EDIT:



          For incoming traffic:



          You can define a static IP for a service type LoadBalancer. You must hav the static IP reserved before hand and you can define the spec.loadBalancerIP field to use the reserved IP address.



          You can also assign a static IP to an Ingress resource using an annotation



          For outbound or Egress traffic:



          There is no way to have GKE use predefined static IPs as the nodes are created from a single template which can't include the static IPs.



          Nodes, like many k8s components, are meant to be ephemeral and stateless. In most cases where static IPs are necessary, it is because the cluster will be making calls to an outside application or end point and the IPs must be whitelisted. In those situations, it is recommended to use a NAT which will use a static IP.



          You can follow this tutorial or consider using Cloud NAT with GKE






          share|improve this answer


























          • k8s does have this ability and can use a static IP in the config. My question was if k8s can reach out to GCP and create a reservation. k8s Service Catalog can provision cloud resources which is what this operation would be

            – red888
            Nov 26 '18 at 15:48











          • no, it can't be done in GKE. The service catalog can provision external resources, not the nodes themselves in GCP. There is no way incorporated info GKE that allows the reservation of static IPs for the cluster as part of node creation. The IPs need to be reserved or changed after the fact

            – Patrick W
            Nov 26 '18 at 15:53













          • this would be a Service of type loadBalancer- editing my question title

            – red888
            Nov 26 '18 at 15:57













          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',
          autoActivateHeartbeat: false,
          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%2f53472153%2fhow-can-gke-create-a-reserved-public-or-private-gcp-address-for-use-in-a-loadbal%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









          0














          EDIT:



          For incoming traffic:



          You can define a static IP for a service type LoadBalancer. You must hav the static IP reserved before hand and you can define the spec.loadBalancerIP field to use the reserved IP address.



          You can also assign a static IP to an Ingress resource using an annotation



          For outbound or Egress traffic:



          There is no way to have GKE use predefined static IPs as the nodes are created from a single template which can't include the static IPs.



          Nodes, like many k8s components, are meant to be ephemeral and stateless. In most cases where static IPs are necessary, it is because the cluster will be making calls to an outside application or end point and the IPs must be whitelisted. In those situations, it is recommended to use a NAT which will use a static IP.



          You can follow this tutorial or consider using Cloud NAT with GKE






          share|improve this answer


























          • k8s does have this ability and can use a static IP in the config. My question was if k8s can reach out to GCP and create a reservation. k8s Service Catalog can provision cloud resources which is what this operation would be

            – red888
            Nov 26 '18 at 15:48











          • no, it can't be done in GKE. The service catalog can provision external resources, not the nodes themselves in GCP. There is no way incorporated info GKE that allows the reservation of static IPs for the cluster as part of node creation. The IPs need to be reserved or changed after the fact

            – Patrick W
            Nov 26 '18 at 15:53













          • this would be a Service of type loadBalancer- editing my question title

            – red888
            Nov 26 '18 at 15:57


















          0














          EDIT:



          For incoming traffic:



          You can define a static IP for a service type LoadBalancer. You must hav the static IP reserved before hand and you can define the spec.loadBalancerIP field to use the reserved IP address.



          You can also assign a static IP to an Ingress resource using an annotation



          For outbound or Egress traffic:



          There is no way to have GKE use predefined static IPs as the nodes are created from a single template which can't include the static IPs.



          Nodes, like many k8s components, are meant to be ephemeral and stateless. In most cases where static IPs are necessary, it is because the cluster will be making calls to an outside application or end point and the IPs must be whitelisted. In those situations, it is recommended to use a NAT which will use a static IP.



          You can follow this tutorial or consider using Cloud NAT with GKE






          share|improve this answer


























          • k8s does have this ability and can use a static IP in the config. My question was if k8s can reach out to GCP and create a reservation. k8s Service Catalog can provision cloud resources which is what this operation would be

            – red888
            Nov 26 '18 at 15:48











          • no, it can't be done in GKE. The service catalog can provision external resources, not the nodes themselves in GCP. There is no way incorporated info GKE that allows the reservation of static IPs for the cluster as part of node creation. The IPs need to be reserved or changed after the fact

            – Patrick W
            Nov 26 '18 at 15:53













          • this would be a Service of type loadBalancer- editing my question title

            – red888
            Nov 26 '18 at 15:57
















          0












          0








          0







          EDIT:



          For incoming traffic:



          You can define a static IP for a service type LoadBalancer. You must hav the static IP reserved before hand and you can define the spec.loadBalancerIP field to use the reserved IP address.



          You can also assign a static IP to an Ingress resource using an annotation



          For outbound or Egress traffic:



          There is no way to have GKE use predefined static IPs as the nodes are created from a single template which can't include the static IPs.



          Nodes, like many k8s components, are meant to be ephemeral and stateless. In most cases where static IPs are necessary, it is because the cluster will be making calls to an outside application or end point and the IPs must be whitelisted. In those situations, it is recommended to use a NAT which will use a static IP.



          You can follow this tutorial or consider using Cloud NAT with GKE






          share|improve this answer















          EDIT:



          For incoming traffic:



          You can define a static IP for a service type LoadBalancer. You must hav the static IP reserved before hand and you can define the spec.loadBalancerIP field to use the reserved IP address.



          You can also assign a static IP to an Ingress resource using an annotation



          For outbound or Egress traffic:



          There is no way to have GKE use predefined static IPs as the nodes are created from a single template which can't include the static IPs.



          Nodes, like many k8s components, are meant to be ephemeral and stateless. In most cases where static IPs are necessary, it is because the cluster will be making calls to an outside application or end point and the IPs must be whitelisted. In those situations, it is recommended to use a NAT which will use a static IP.



          You can follow this tutorial or consider using Cloud NAT with GKE







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 27 '18 at 15:00

























          answered Nov 26 '18 at 15:43









          Patrick WPatrick W

          9391211




          9391211













          • k8s does have this ability and can use a static IP in the config. My question was if k8s can reach out to GCP and create a reservation. k8s Service Catalog can provision cloud resources which is what this operation would be

            – red888
            Nov 26 '18 at 15:48











          • no, it can't be done in GKE. The service catalog can provision external resources, not the nodes themselves in GCP. There is no way incorporated info GKE that allows the reservation of static IPs for the cluster as part of node creation. The IPs need to be reserved or changed after the fact

            – Patrick W
            Nov 26 '18 at 15:53













          • this would be a Service of type loadBalancer- editing my question title

            – red888
            Nov 26 '18 at 15:57





















          • k8s does have this ability and can use a static IP in the config. My question was if k8s can reach out to GCP and create a reservation. k8s Service Catalog can provision cloud resources which is what this operation would be

            – red888
            Nov 26 '18 at 15:48











          • no, it can't be done in GKE. The service catalog can provision external resources, not the nodes themselves in GCP. There is no way incorporated info GKE that allows the reservation of static IPs for the cluster as part of node creation. The IPs need to be reserved or changed after the fact

            – Patrick W
            Nov 26 '18 at 15:53













          • this would be a Service of type loadBalancer- editing my question title

            – red888
            Nov 26 '18 at 15:57



















          k8s does have this ability and can use a static IP in the config. My question was if k8s can reach out to GCP and create a reservation. k8s Service Catalog can provision cloud resources which is what this operation would be

          – red888
          Nov 26 '18 at 15:48





          k8s does have this ability and can use a static IP in the config. My question was if k8s can reach out to GCP and create a reservation. k8s Service Catalog can provision cloud resources which is what this operation would be

          – red888
          Nov 26 '18 at 15:48













          no, it can't be done in GKE. The service catalog can provision external resources, not the nodes themselves in GCP. There is no way incorporated info GKE that allows the reservation of static IPs for the cluster as part of node creation. The IPs need to be reserved or changed after the fact

          – Patrick W
          Nov 26 '18 at 15:53







          no, it can't be done in GKE. The service catalog can provision external resources, not the nodes themselves in GCP. There is no way incorporated info GKE that allows the reservation of static IPs for the cluster as part of node creation. The IPs need to be reserved or changed after the fact

          – Patrick W
          Nov 26 '18 at 15:53















          this would be a Service of type loadBalancer- editing my question title

          – red888
          Nov 26 '18 at 15:57







          this would be a Service of type loadBalancer- editing my question title

          – red888
          Nov 26 '18 at 15:57






















          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.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53472153%2fhow-can-gke-create-a-reserved-public-or-private-gcp-address-for-use-in-a-loadbal%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

          To store a contact into the json file from server.js file using a class in NodeJS

          Redirect URL with Chrome Remote Debugging Android Devices

          Dieringhausen