LoadBalancer Service Stuck in "Pending" State When Using Shared VIP and Modifying Ports
search cancel

LoadBalancer Service Stuck in "Pending" State When Using Shared VIP and Modifying Ports

book

Article ID: 434411

calendar_today

Updated On:

Products

VMware Avi Load Balancer

Issue/Introduction

When using the Avi Kubernetes Operator (AKO), a Kubernetes Service of type LoadBalancer may remain in a <pending> state after adding or removing ports from the service definition.

Environment

VKS with Avi Land Balancer with AKO

Cause

When using the Avi Kubernetes Operator (AKO), a Kubernetes Service of type LoadBalancer may remain in a <pending> state after adding or removing ports from the service definition.

This issue specifically occurs when:

  • The service is configured with the annotation: ako.vmware.com/enable-shared-vip: "true".

  • The service has multiple ports defined.

  • An update is made to the spec.ports section of the Service YAML.

    Example Output:

    Bash
     
    NAME              TYPE           CLUSTER-IP         EXTERNAL-IP   PORT(S)                              AGE
    http-service-lb   LoadBalancer   <ip_address>      <pending>     80:####/TCP, 443:#####/TCP            6m5s

     

Resolution

Workaround

If you are unable to upgrade your AKO version immediately, use one of the following methods to restore service:

Option 1: Disable Shared VIP (Recommended)

If your application architecture does not strictly require multiple services to share the same IP address, remove the annotation from your service definition:

  1. Edit the service: kubectl edit svc <service-name>

  2. Remove the line: ako.vmware.com/enable-shared-vip: "true"

  3. Save and exit.


Option 2: Restart the AKO Pod

If you must use the Shared VIP feature, you can force a re-sync by restarting the AKO pod after you have modified the ports:

       Delete the AKO pod (Kubernetes will recreate it automatically):

kubectl delete pod -n avi-system ako-0

 

This issue is officially resolved in AKO Release 2.2.1. (To be released)