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.
VKS with Avi Land Balancer with AKO
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:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
http-service-lb LoadBalancer <ip_address> <pending> 80:####/TCP, 443:#####/TCP 6m5sIf you are unable to upgrade your AKO version immediately, use one of the following methods to restore service:
If your application architecture does not strictly require multiple services to share the same IP address, remove the annotation from your service definition:
Edit the service: kubectl edit svc <service-name>
Remove the line: ako.vmware.com/enable-shared-vip: "true"
Save and exit.
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)