kubernetes on google failed to create load balancer ip static

3/20/2017

Although I reserved a static IP I got the following warning, while not having load balancer created :

> kubectl describe svc --namespace=api-1dt-dc
  FirstSeen LastSeen    Count   From            SubObjectPath   Type        Reason              Message
  --------- --------    -----   ----            -------------   --------    ------              -------
  48m       2m      15  {service-controller }           Normal      CreatingLoadBalancer        Creating load balancer
  48m       2m      15  {service-controller }           Warning     CreatingLoadBalancerFailed  Error creating load balancer (will retry): Failed to create load balancer for service api-1dt-dc/review-k8s-4yl6zk: requested ip 35.186.202.220 is neither static nor assigned to LB ad3c982840d0311e7b45942010a84004(api-1dt-dc/review-k8s-4yl6zk): <nil>
-- Thomas Parquier
google-kubernetes-engine
kubernetes
load-balancing
static-ip-address

2 Answers

3/20/2017

OK, it seems to work only with regional IPs...

-- Thomas Parquier
Source: StackOverflow

7/10/2019

Hitting same issue while trying to expose with LoadBalancer.

  Normal   EnsuredLoadBalancer         2m (x2 over 1h)  service-controller  Ensured load balancer
  Warning  CreatingLoadBalancerFailed  2m (x2 over 1h)  service-controller  Error creating load balancer (will retry): not persisting update to service 'default/cb-gke-demo-ui' that has been changed since we received it: Operation cannot be fulfilled on services "cb-gke-demo-ui": the object has been modified; please apply your changes to the latest version and try again

Not sure how to fix it? GKE k8s cluster is deployed across AZz.

-- ram dhakne
Source: StackOverflow