ClusterIP: None and failing pods











up vote
1
down vote

favorite












I have an NGINX in front of several PODs, exposed through ClusterIP: none.



NGINX is forwarding traffic to these nodes like that:



upstream api {
server my-api:1066;
}


Will this configuration distribute traffic evenly among all PODs behind the my-api hostname?
Will failing PODs be removed from the hostname resolution?










share|improve this question


























    up vote
    1
    down vote

    favorite












    I have an NGINX in front of several PODs, exposed through ClusterIP: none.



    NGINX is forwarding traffic to these nodes like that:



    upstream api {
    server my-api:1066;
    }


    Will this configuration distribute traffic evenly among all PODs behind the my-api hostname?
    Will failing PODs be removed from the hostname resolution?










    share|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I have an NGINX in front of several PODs, exposed through ClusterIP: none.



      NGINX is forwarding traffic to these nodes like that:



      upstream api {
      server my-api:1066;
      }


      Will this configuration distribute traffic evenly among all PODs behind the my-api hostname?
      Will failing PODs be removed from the hostname resolution?










      share|improve this question













      I have an NGINX in front of several PODs, exposed through ClusterIP: none.



      NGINX is forwarding traffic to these nodes like that:



      upstream api {
      server my-api:1066;
      }


      Will this configuration distribute traffic evenly among all PODs behind the my-api hostname?
      Will failing PODs be removed from the hostname resolution?







      nginx kubernetes google-cloud-platform






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 7 at 9:06









      Alex Tbk

      490520




      490520
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          The default traffic distribution for Kubernetes services is random based on the default proxy mode: iptables. (This is likely your case)



          In very old Kubernetes versions (<1.1) the default proxy mode: userspace would default to round-robin (you can still switch to that mode if you'd like to)



          The newer way (< 1.8) of doing round robin (optionally) is to use proxy mode: ipvs.



          You can also look at other solutions like Cillium that provide load balancing capabilities.






          share|improve this answer





















          • Is it wiser to assign fixed clusterip adresses to the pods behind nginx, so NGINX would exclude failed nodes? I am talking about -- upstream api {server my-api:1066;} (clusterip: none for my-api) -- vs upstream api {server api-ip1:1066;server api-ip2:1066;}
            – Alex Tbk
            Nov 8 at 6:08










          • Not really, because those change as pods come up and down, the service remains constant and it's manage by Kubernetes through endpoints
            – Rico
            Nov 8 at 18:08











          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%2f53186324%2fclusterip-none-and-failing-pods%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













          The default traffic distribution for Kubernetes services is random based on the default proxy mode: iptables. (This is likely your case)



          In very old Kubernetes versions (<1.1) the default proxy mode: userspace would default to round-robin (you can still switch to that mode if you'd like to)



          The newer way (< 1.8) of doing round robin (optionally) is to use proxy mode: ipvs.



          You can also look at other solutions like Cillium that provide load balancing capabilities.






          share|improve this answer





















          • Is it wiser to assign fixed clusterip adresses to the pods behind nginx, so NGINX would exclude failed nodes? I am talking about -- upstream api {server my-api:1066;} (clusterip: none for my-api) -- vs upstream api {server api-ip1:1066;server api-ip2:1066;}
            – Alex Tbk
            Nov 8 at 6:08










          • Not really, because those change as pods come up and down, the service remains constant and it's manage by Kubernetes through endpoints
            – Rico
            Nov 8 at 18:08















          up vote
          1
          down vote













          The default traffic distribution for Kubernetes services is random based on the default proxy mode: iptables. (This is likely your case)



          In very old Kubernetes versions (<1.1) the default proxy mode: userspace would default to round-robin (you can still switch to that mode if you'd like to)



          The newer way (< 1.8) of doing round robin (optionally) is to use proxy mode: ipvs.



          You can also look at other solutions like Cillium that provide load balancing capabilities.






          share|improve this answer





















          • Is it wiser to assign fixed clusterip adresses to the pods behind nginx, so NGINX would exclude failed nodes? I am talking about -- upstream api {server my-api:1066;} (clusterip: none for my-api) -- vs upstream api {server api-ip1:1066;server api-ip2:1066;}
            – Alex Tbk
            Nov 8 at 6:08










          • Not really, because those change as pods come up and down, the service remains constant and it's manage by Kubernetes through endpoints
            – Rico
            Nov 8 at 18:08













          up vote
          1
          down vote










          up vote
          1
          down vote









          The default traffic distribution for Kubernetes services is random based on the default proxy mode: iptables. (This is likely your case)



          In very old Kubernetes versions (<1.1) the default proxy mode: userspace would default to round-robin (you can still switch to that mode if you'd like to)



          The newer way (< 1.8) of doing round robin (optionally) is to use proxy mode: ipvs.



          You can also look at other solutions like Cillium that provide load balancing capabilities.






          share|improve this answer












          The default traffic distribution for Kubernetes services is random based on the default proxy mode: iptables. (This is likely your case)



          In very old Kubernetes versions (<1.1) the default proxy mode: userspace would default to round-robin (you can still switch to that mode if you'd like to)



          The newer way (< 1.8) of doing round robin (optionally) is to use proxy mode: ipvs.



          You can also look at other solutions like Cillium that provide load balancing capabilities.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 7 at 18:58









          Rico

          23.4k94864




          23.4k94864












          • Is it wiser to assign fixed clusterip adresses to the pods behind nginx, so NGINX would exclude failed nodes? I am talking about -- upstream api {server my-api:1066;} (clusterip: none for my-api) -- vs upstream api {server api-ip1:1066;server api-ip2:1066;}
            – Alex Tbk
            Nov 8 at 6:08










          • Not really, because those change as pods come up and down, the service remains constant and it's manage by Kubernetes through endpoints
            – Rico
            Nov 8 at 18:08


















          • Is it wiser to assign fixed clusterip adresses to the pods behind nginx, so NGINX would exclude failed nodes? I am talking about -- upstream api {server my-api:1066;} (clusterip: none for my-api) -- vs upstream api {server api-ip1:1066;server api-ip2:1066;}
            – Alex Tbk
            Nov 8 at 6:08










          • Not really, because those change as pods come up and down, the service remains constant and it's manage by Kubernetes through endpoints
            – Rico
            Nov 8 at 18:08
















          Is it wiser to assign fixed clusterip adresses to the pods behind nginx, so NGINX would exclude failed nodes? I am talking about -- upstream api {server my-api:1066;} (clusterip: none for my-api) -- vs upstream api {server api-ip1:1066;server api-ip2:1066;}
          – Alex Tbk
          Nov 8 at 6:08




          Is it wiser to assign fixed clusterip adresses to the pods behind nginx, so NGINX would exclude failed nodes? I am talking about -- upstream api {server my-api:1066;} (clusterip: none for my-api) -- vs upstream api {server api-ip1:1066;server api-ip2:1066;}
          – Alex Tbk
          Nov 8 at 6:08












          Not really, because those change as pods come up and down, the service remains constant and it's manage by Kubernetes through endpoints
          – Rico
          Nov 8 at 18:08




          Not really, because those change as pods come up and down, the service remains constant and it's manage by Kubernetes through endpoints
          – Rico
          Nov 8 at 18:08


















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53186324%2fclusterip-none-and-failing-pods%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







          這個網誌中的熱門文章

          Xamarin.form Move up view when keyboard appear

          Post-Redirect-Get with Spring WebFlux and Thymeleaf

          JBPM : POST request for execute process go wrong