diff --git a/pkg/cloudprovider/providers/azure/azure_loadbalancer.go b/pkg/cloudprovider/providers/azure/azure_loadbalancer.go index 5267b736add..44b59062314 100644 --- a/pkg/cloudprovider/providers/azure/azure_loadbalancer.go +++ b/pkg/cloudprovider/providers/azure/azure_loadbalancer.go @@ -199,7 +199,8 @@ func (az *Cloud) getServiceLoadBalancer(service *v1.Service, clusterName string, // check if the service already has a load balancer if existingLBs != nil { - for _, existingLB := range existingLBs { + for i := range existingLBs { + existingLB := existingLBs[i] if strings.EqualFold(*existingLB.Name, defaultLBName) { defaultLB = &existingLB }