简体   繁体   中英

How to fix DigitalOcean Kubernetes load balancer throwing errors - SyncLoadBalancerFailed

I am having trouble with kube.netes cluster and setting up a load balancer with Digital Ocean. The config has worked before, but I'm not sure if something is an outdated version or needs some other change to make this work. Is there a way to ensure the SyncLoadBalancer succeeds? I have waited for more than an hour and the load balancer has long been listed as online in the DigitalOcean dashboard.

Name:                     my-cluster
Namespace:                default
Labels:                   app.kubernetes.io/instance=prod
                          app.kubernetes.io/managed-by=Helm
                          app.kubernetes.io/name=my-company
                          app.kubernetes.io/part-of=my-company
                          app.kubernetes.io/version=1.1.67
                          helm.sh/chart=my-company-0.1.51
Annotations:              kubernetes.digitalocean.com/load-balancer-id: e7bbf8b7-29e0-407c-adce-XXXXXXXXX
                          meta.helm.sh/release-name: prod
                          meta.helm.sh/release-namespace: default
                          service.beta.kubernetes.io/do-loadbalancer-certificate-id: 8be22723-b242-4bea-9963-XXXXXXXX
                          service.beta.kubernetes.io/do-loadbalancer-disable-lets-encrypt-dns-records: false
                          service.beta.kubernetes.io/do-loadbalancer-name: prod-load-balancer
                          service.beta.kubernetes.io/do-loadbalancer-protocol: https
                          service.beta.kubernetes.io/do-loadbalancer-size-unit: 1
Selector:                 app.kubernetes.io/instance=prod,app.kubernetes.io/name=my-company,app.kubernetes.io/part-of=my-company
Type:                     LoadBalancer
IP Family Policy:         SingleStack
IP Families:              IPv4
IP:                       10.245.16.78
IPs:                      10.245.16.78
LoadBalancer Ingress:     24.199.70.237
Port:                     https  443/TCP
TargetPort:               http/TCP
NodePort:                 https  32325/TCP
Endpoints:                10.244.0.163:80
Session Affinity:         None
External Traffic Policy:  Cluster
Events:
  Type     Reason                  Age                 From                Message
  ----     ------                  ----                ----                -------
  Warning  SyncLoadBalancerFailed  18m                 service-controller  Error syncing load balancer: failed to ensure load balancer: load-balancer is not yet active (current status: new)
  Warning  SyncLoadBalancerFailed  18m                 service-controller  Error syncing load balancer: failed to ensure load balancer: failed to update load-balancer with ID e7bbf8b7-29e0-407c-adce-94a3205b38b5: PUT https://api.digitalocean.com/v2/load_balancers/e7bbf8b7-29e0-407c-adce-94a3205b38b5: 403 (request "b06545a5-c701-46d1-be84-3740196c21c7") Load Balancer can't be updated while it processes previous actions
  Warning  SyncLoadBalancerFailed  18m                 service-controller  Error syncing load balancer: failed to ensure load balancer: failed to update load-balancer with ID e7bbf8b7-29e0-407c-adce-94a3205b38b5: PUT https://api.digitalocean.com/v2/load_balancers/e7bbf8b7-29e0-407c-adce-94a3205b38b5: 403 (request "27b58084-7ff0-46a3-830b-6210a12278ab") Load Balancer can't be updated while it processes previous actions
  Warning  SyncLoadBalancerFailed  17m                 service-controller  Error syncing load balancer: failed to ensure load balancer: failed to update load-balancer with ID e7bbf8b7-29e0-407c-adce-94a3205b38b5: PUT https://api.digitalocean.com/v2/load_balancers/e7bbf8b7-29e0-407c-adce-94a3205b38b5: 403 (request "22ff352c-8486-4a69-8ffc-a4bba64147dc") Load Balancer can't be updated while it processes previous actions
  Warning  SyncLoadBalancerFailed  17m                 service-controller  Error syncing load balancer: failed to ensure load balancer: failed to update load-balancer with ID e7bbf8b7-29e0-407c-adce-94a3205b38b5: PUT https://api.digitalocean.com/v2/load_balancers/e7bbf8b7-29e0-407c-adce-94a3205b38b5: 403 (request "ec7f0138-99ba-4932-b1ff-1cfe46ed24c5") Load Balancer can't be updated while it processes previous actions
  Normal   EnsuringLoadBalancer    15m (x10 over 10h)  service-controller  Ensuring load balancer
  Normal   EnsuredLoadBalancer     15m (x5 over 10h)   service-controller  Ensured load balancer

Below are troubleshooting steps that might help resolve your issue:

  1. If you are specifying 2 ports in the yaml file the load balancer will take the whole range between the 2 ports, thus blocking and making them unable to be reused for another service
  2. If you are already using a port ex:8086 for the forwarding rule it cannot be reused for another service
  3. If you have health checks enabled on your load balancer check if those health checks are all passing.
  4. Verify that the load balancer is reachable from the public inte.net.
  5. Finally restart the cluster and try to deploy again.

For more information follow troubleshooting documentation . Adding issue with a similar error.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM