good morning everyone! does anyone know if the loa...
# google-cloud
good morning everyone! does anyone know if the load balanced frontends we create in GKE as a service are charged separately by GCP? I can't find pricing info on that
if you’re talking about services with
type, there are charged separately AFAIK
service will reserve a public IP address and create a forwarding rule; for the pricing check and part “Load balancing and forwarding rules”
if you want to make it cheaper, I strongly suggest installing some ingress controller (like so you can create one service exposing it (= pay for 1 forwarding rule) and route the incoming traffic internally via ingress definitions
interesting, thank you @prehistoric-activity-61023
@prehistoric-activity-61023, how do you then keep a service's infrastructure separate since you're affecting a shared resource (the ingress) ?
you can declare multiple ingress resources
ingress-nginx controller (and other similar solutions) will take care of it
I hope that answers your question?
I'll take your word for it until I do some more reading 🙂
in other words, in case of using some ingress controller, it usually looks like this: • 1 x load balancer service for handling incoming connections • N ingress resources defining different routes (based on path prefix, domain etc.)
right, so there's an internal load balancer that shares the load between replicas for a k8s service and then ingress rules define which lb the traffic ends up on?
Give it a try on a fresh GKE instance, so you can check it yourself: • install • usage Keep in mind that you might be forced to explicitly set
. Otherwise, default ingress controller will handle it (and that might be Google Load Balancer).
Yep, I think you got it quite right.
Are you familiar with nginx?
Ingress-nginx controller actually observes the k8s resources (ingresses) and based on their specs, it updates the nginx configuration so it can properly route the requests. It’s “that” simple 😉
very good! reading up on GKE vs nginx ingress
@prehistoric-activity-61023 any idea where I can find an example to create the ingress itself (not the rule) on gke?
OMG it's further up
sorry 😕