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
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
add a comment |
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
add a comment |
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
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
kubernetes load-balancing
asked Mar 21 at 13:43
NeekoyNeekoy
9941022
9941022
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
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
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
add a comment |
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
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
add a comment |
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
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
add a comment |
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
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
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
add a comment |
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
add a comment |
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
add a comment |
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
add a comment |
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
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
edited Mar 21 at 14:35
answered Mar 21 at 14:23
P EkambaramP Ekambaram
1,457718
1,457718
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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