Does editing service config recreate the service object?

297 Views Asked by At

I have a service type Loadbalancer in GKE and I want to add "externalTrafficPolicy: Local" to it, and I'm wondering whether this will cause it to be recreated and thus loose the current external IP address or it will keep that address?

1

There are 1 best solutions below

0
On BEST ANSWER

This will not recreate the service, and you can Reserve static IP Address in the service just to be safe.

loadBalancerIP enables you to choose a specific IP address for the load balancer. The IP address must not be in use by another internal TCP/UDP load balancer or Service. If omitted, an ephemeral IP is assigned.

You can refer to below docs for more info, how-to and details.

Reserving a static external IP address

GKE Load Balancing