CreateLoadbalancerError" can be seen in the Kubernetes Container Clusters UI in the Cluster Information page, in the Events tab:Event DetailsName: CreateLoadbalancerErrorType: ErrorTime: <DATE>Resource Name: <RESOURCE_NAME>Detailed Error: unable to create load balancer. err [unable to determine if gateway [<EDGE_NAME>] is using Ip Spaces or not. error [[ENF] entity not found: got 0 Edge Gateways by name '<EDGE_NAME>']]
This issue occurs if the Edge Gateway and Routed Organization VDC Network are scoped to a Data Center Group in VMware Cloud Director (VCD), IP Spaces are in use and no load balancer IP address is provided when creating the service.
To confirm if the Edge Gateway and Routed Organization VDC Network are part of a Data Center Group, view the Scope column visible in the Tenant portal of Cloud Director in Networking > Edge Gateways and Networking > Networks.
To view the Data Center Groups in the Tenant portal of Cloud Director navigate to Networking > Data Center Groups.
This issue is resolved in the Kubernetes External Cloud Provider for VMware Cloud Director 1.6.1 release.
To configure CSE to use this CPI 1.6.1 version when creating Kubernetes clusters, update the CSE server configuration through the Cloud Director Provider portal as per the documentation, Update Server Configuration.
To workaround this issue deploy the Kubernetes clusters to a Routed Organization VDC network and not a Data Center Group network.
Alternatively to workaround this issue specify a load balancer IP when creating a load balancer service instead of allowing one to be automatically assigned.
To determine the IPs available review the specific IP Space used with the Edge Gateway and Routed Organization VDC network to which the Kubernetes cluster is connected in the Tenant portal of Cloud Director in Networking > IP Spaces > IP Space Name > Floating IPs.
Please see the example workarounds below for different operations which request a load balancer service in a Kubernetes cluster deployed by CSE.
NOTE: These examples are provided for reference only and other changes may be required for the Kubernetes cluster in question.
loadBalancerIP option to specify the desired IP address:
apiVersion: v1kind: Servicemetadata: name: my-servicespec: ports: - protocol: TCP port: 80 targetPort: 80 externalTrafficPolicy: Cluster loadBalancerIP: #.#.#.# type: LoadBalancer
kubectl apply -f my-service.yaml
kubectl expose command to create a load balancer service use the --load-balancer-ip option to specify the desired IP address:
kubectl expose deployment my-deployment --port=80 --type=LoadBalancer --load-balancer-ip=#.#.#.#
contour-data-values.yaml, for the Contour package and use the loadBalancerIP option to specify the desired IP address:
infrastructure_provider: vspherenamespace: tanzu-system-ingresscontour: configFileContents: {} useProxyProtocol: false replicas: 2 pspNames: "vmware-system-restricted" logLevel: infoenvoy: service: type: LoadBalancer annotations: {} externalTrafficPolicy: Cluster disableWait: false loadBalancerIP: #.#.#.# hostPorts: enable: true http: 80 https: 443 hostNetwork: false terminationGracePeriodSeconds: 300 logLevel: infocertificates: duration: 8760h renewBefore: 360h