Load Balancing an application in KubernetesExternal Load Balancer for Kubernetes clusterKubernetes, GCE, Load balancing, SSLCreate kubernetes nginx ingress without GCP load-balancerHow to kickoff the dead replicas of Kubernetes DeploymentIngress resource having backend kubernetes services in multiple namespaceLoad Balancing Applications in Kubernetes Bare-MetalIs there a way to not use GKE's standard load balancer?Route Google Cloud global load balancer traffic to Kubernetes Cluster?Default Load Balancing in KubernetesNginx ingress controller vs HAProxy load balancer

Is it possible to build a CPA Secure encryption scheme which remains secure even when the encryption of secret key is given?

Should my PhD thesis be submitted under my legal name?

Can I rely on these GitHub repository files?

My boss asked me to take a one-day class, then signs it up as a day off

Can somebody explain Brexit in a few child-proof sentences?

How did Monica know how to operate Carol's "designer"?

How will losing mobility of one hand affect my career as a programmer?

Is there a problem with hiding "forgot password" until it's needed?

Greatest common substring

I'm in charge of equipment buying but no one's ever happy with what I choose. How to fix this?

Invariance of results when scaling explanatory variables in logistic regression, is there a proof?

Can a controlled ghast be a leader of a pack of ghouls?

What is Sitecore Managed Cloud?

Java - What do constructor type arguments mean when placed *before* the type?

Is there any significance to the Valyrian Stone vault door of Qarth?

Identify a stage play about a VR experience in which participants are encouraged to simulate performing horrific activities

How to deal with or prevent idle in the test team?

Can a Gentile theist be saved?

Simple recursive Sudoku solver

Can the electrostatic force be infinite in magnitude?

node command while defining a coordinate in TikZ

For airliners, what prevents wing strikes on landing in bad weather?

Perfect riffle shuffles

Calculating the number of days between 2 dates in Excel



Load Balancing an application in Kubernetes


External Load Balancer for Kubernetes clusterKubernetes, GCE, Load balancing, SSLCreate kubernetes nginx ingress without GCP load-balancerHow to kickoff the dead replicas of Kubernetes DeploymentIngress resource having backend kubernetes services in multiple namespaceLoad Balancing Applications in Kubernetes Bare-MetalIs there a way to not use GKE's standard load balancer?Route Google Cloud global load balancer traffic to Kubernetes Cluster?Default Load Balancing in KubernetesNginx ingress controller vs HAProxy load balancer













1















Lets say that I have two deployments which contain two instances of a backend application. (Instead of having one deployment with multiple replicas, as they need to be configured differently).



How would you guys go about load balancing between the two? The classic approach would be to set up HAProxy with the two backends. Does this sound right in the context of Kubernetes? Is there a better way to expose two deployments on a single Ingress Controller resource?










share|improve this question


























    1















    Lets say that I have two deployments which contain two instances of a backend application. (Instead of having one deployment with multiple replicas, as they need to be configured differently).



    How would you guys go about load balancing between the two? The classic approach would be to set up HAProxy with the two backends. Does this sound right in the context of Kubernetes? Is there a better way to expose two deployments on a single Ingress Controller resource?










    share|improve this question
























      1












      1








      1








      Lets say that I have two deployments which contain two instances of a backend application. (Instead of having one deployment with multiple replicas, as they need to be configured differently).



      How would you guys go about load balancing between the two? The classic approach would be to set up HAProxy with the two backends. Does this sound right in the context of Kubernetes? Is there a better way to expose two deployments on a single Ingress Controller resource?










      share|improve this question














      Lets say that I have two deployments which contain two instances of a backend application. (Instead of having one deployment with multiple replicas, as they need to be configured differently).



      How would you guys go about load balancing between the two? The classic approach would be to set up HAProxy with the two backends. Does this sound right in the context of Kubernetes? Is there a better way to expose two deployments on a single Ingress Controller resource?







      kubernetes load-balancing






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 21 at 13:43









      NeekoyNeekoy

      9941022




      9941022






















          2 Answers
          2






          active

          oldest

          votes


















          2














          You can define a Service that will be determined by labels selectors. The requests to the service will be spread across the deployments (as the same with ingress)



          Example:



          apiVersion: v1
          kind: Service
          metadata:
          labels:
          app: my-deployments
          spec:
          ports:
          - port: 80
          selector:
          app: my-deployments





          share|improve this answer























          • And will the service load-balance in the sense of Round Robin rotation between the backends?

            – Neekoy
            Mar 21 at 13:52











          • depends on the ingress implementation, but usually yes

            – Amityo
            Mar 21 at 13:57


















          1














          Ideally you should be running one deployment with multiple replicas. Define the service object selecting the backend pods. The service object automatically load balances the backend pods in round Robin fashion.



          If you want to load balance multiple deployment objects then define one service each for deployment, ServiceA and serviceB. You should be running ha-proxy load balancing the traffic between ServiceA and serviceB.



          We recommend you opt for first approach unless you have a valid reason to consider second approach






          share|improve this answer
























            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%2f55281838%2fload-balancing-an-application-in-kubernetes%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            You can define a Service that will be determined by labels selectors. The requests to the service will be spread across the deployments (as the same with ingress)



            Example:



            apiVersion: v1
            kind: Service
            metadata:
            labels:
            app: my-deployments
            spec:
            ports:
            - port: 80
            selector:
            app: my-deployments





            share|improve this answer























            • And will the service load-balance in the sense of Round Robin rotation between the backends?

              – Neekoy
              Mar 21 at 13:52











            • depends on the ingress implementation, but usually yes

              – Amityo
              Mar 21 at 13:57















            2














            You can define a Service that will be determined by labels selectors. The requests to the service will be spread across the deployments (as the same with ingress)



            Example:



            apiVersion: v1
            kind: Service
            metadata:
            labels:
            app: my-deployments
            spec:
            ports:
            - port: 80
            selector:
            app: my-deployments





            share|improve this answer























            • And will the service load-balance in the sense of Round Robin rotation between the backends?

              – Neekoy
              Mar 21 at 13:52











            • depends on the ingress implementation, but usually yes

              – Amityo
              Mar 21 at 13:57













            2












            2








            2







            You can define a Service that will be determined by labels selectors. The requests to the service will be spread across the deployments (as the same with ingress)



            Example:



            apiVersion: v1
            kind: Service
            metadata:
            labels:
            app: my-deployments
            spec:
            ports:
            - port: 80
            selector:
            app: my-deployments





            share|improve this answer













            You can define a Service that will be determined by labels selectors. The requests to the service will be spread across the deployments (as the same with ingress)



            Example:



            apiVersion: v1
            kind: Service
            metadata:
            labels:
            app: my-deployments
            spec:
            ports:
            - port: 80
            selector:
            app: my-deployments






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 21 at 13:50









            AmityoAmityo

            1,3491018




            1,3491018












            • And will the service load-balance in the sense of Round Robin rotation between the backends?

              – Neekoy
              Mar 21 at 13:52











            • depends on the ingress implementation, but usually yes

              – Amityo
              Mar 21 at 13:57

















            • And will the service load-balance in the sense of Round Robin rotation between the backends?

              – Neekoy
              Mar 21 at 13:52











            • depends on the ingress implementation, but usually yes

              – Amityo
              Mar 21 at 13:57
















            And will the service load-balance in the sense of Round Robin rotation between the backends?

            – Neekoy
            Mar 21 at 13:52





            And will the service load-balance in the sense of Round Robin rotation between the backends?

            – Neekoy
            Mar 21 at 13:52













            depends on the ingress implementation, but usually yes

            – Amityo
            Mar 21 at 13:57





            depends on the ingress implementation, but usually yes

            – Amityo
            Mar 21 at 13:57













            1














            Ideally you should be running one deployment with multiple replicas. Define the service object selecting the backend pods. The service object automatically load balances the backend pods in round Robin fashion.



            If you want to load balance multiple deployment objects then define one service each for deployment, ServiceA and serviceB. You should be running ha-proxy load balancing the traffic between ServiceA and serviceB.



            We recommend you opt for first approach unless you have a valid reason to consider second approach






            share|improve this answer





























              1














              Ideally you should be running one deployment with multiple replicas. Define the service object selecting the backend pods. The service object automatically load balances the backend pods in round Robin fashion.



              If you want to load balance multiple deployment objects then define one service each for deployment, ServiceA and serviceB. You should be running ha-proxy load balancing the traffic between ServiceA and serviceB.



              We recommend you opt for first approach unless you have a valid reason to consider second approach






              share|improve this answer



























                1












                1








                1







                Ideally you should be running one deployment with multiple replicas. Define the service object selecting the backend pods. The service object automatically load balances the backend pods in round Robin fashion.



                If you want to load balance multiple deployment objects then define one service each for deployment, ServiceA and serviceB. You should be running ha-proxy load balancing the traffic between ServiceA and serviceB.



                We recommend you opt for first approach unless you have a valid reason to consider second approach






                share|improve this answer















                Ideally you should be running one deployment with multiple replicas. Define the service object selecting the backend pods. The service object automatically load balances the backend pods in round Robin fashion.



                If you want to load balance multiple deployment objects then define one service each for deployment, ServiceA and serviceB. You should be running ha-proxy load balancing the traffic between ServiceA and serviceB.



                We recommend you opt for first approach unless you have a valid reason to consider second approach







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Mar 21 at 14:35

























                answered Mar 21 at 14:23









                P EkambaramP Ekambaram

                1,457718




                1,457718



























                    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%2f55281838%2fload-balancing-an-application-in-kubernetes%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

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                    Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript