Is there is way to configure load balancing mode within manifest yaml when creating GKE ingress?

12/14/2020

Currently HTTP(S) L7 load balancer, created out of the box by GKE ingress, configures load balancing mode to RPS.I want to set the load balancing mode to Utilization. Is there a way to configure it within the manifest yaml file? (I don't wan't to set it manually)

-- tayyab
google-cloud-platform
google-kubernetes-engine
kubernetes

1 Answer

12/15/2020

Welcome to Stack Overflow! First things first, a little housekeeping: you will get much better responses here if you post the code you're working with (redacted, naturally) and also list out the things you've already tried. You can edit your post to add more details, rather than creating a new post.

Now, without seeing your manifest file - I'm going to guess that you're talking about an L7 ILB - I would recommend that you use the API section of the GCP docs for reference as you edit your manifest. Translating the JSON reference there into YAML, it would probably look something like this:

name: l7-ilb-backend-service
backends:
- group: projects/[project-id]/zones/us-west1-a/instanceGroups/l7-ilb-backend-example
  balancingMode: UTILIZATION

Untested, because there's no manifest to work with.

-- ingernet
Source: StackOverflow