Hi Pierre Le Fevre Facing a similar kind of issue when trying to acquire Loadbalncer Ip
Any workaround for the issue ❯ k describe svc kiran Name: kiran Namespace: default Labels: run=nginx Annotations: <none> Selector: run=nginx Type: LoadBalancer IP Family Policy: SingleStack IP Families: IPv4 IP: 10.99.211.32 IPs: 10.99.211.32 Port: <unset> 80/TCP TargetPort: 8000/TCP NodePort: <unset> 31588/TCP Endpoints: 10.44.0.4:8000,10.44.0.5:8000 Session Affinity: None External Traffic Policy: Cluster Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal EnsuringLoadBalancer 61s (x2 over 2m31s) service-controller Ensuring load balancer Warning SyncLoadBalancerFailed 31s (x2 over 2m1s) service-controller Error syncing load balancer: failed to ensure load balancer: error retrieving load balancer rules: Get http://10.102.192.220:8080/client/api?apiKey=ih7O6aKn0-LD7FL2Y6H3wfXv0B1iRXQOG7rZc5iip__eNmiRpKx_27dF5sy_6kJ-7OZt7mx7w9wZHu9Pq9bRfA&command=listLoadBalancerRules&keyword=a94511f7024b24efdaae576625a6fe68&listall=true&response=json&signature=bpLHBJTA1LgLGV9DCevvKshu2Zg%3D: dial tcp 10.102.192.220:8080: i/o timeout Regards Kiran On Thu, Jun 16, 2022 at 8:33 PM Pierre Le Fevre <[email protected]> wrote: > Hi all, > > I have recently been experimenting with Kubernetes in CloudStack and came > across a quite odd problem with the communication > between cloudstack-kubernetes-provider and the CloudStack API. > > After some experimentation with the cloud-config api-url variable, it seems > that connection should be happening. I tried using wget from within > the pods with success. > However, whenever services try to sync the load balancer to CloudStack, the > error* Error syncing load balancer: failed to ensure load balancer: could > not find network *shows up. > > Taking a look at the logs of *cloud-controller-manager*, the same three > rows come up repeatedly: > > I0616 14:02:26.189085 1 event.go:278] > Event(v1.ObjectReference{Kind:"Service", Namespace:"default", Name:"balls", > UID:"f75f1f54-2c97-4417-946d-90a536087ad8", APIVersion:"v1", > ResourceVersion:"1776", FieldPath:""}): type: 'Normal' reason: > 'EnsuringLoadBalancer' Ensuring load balancer > > E0616 14:02:26.273801 1 controller.go:244] error processing service > default/balls (will retry): failed to ensure load balancer: could not find > network > > I0616 14:02:26.274430 1 event.go:278] > Event(v1.ObjectReference{Kind:"Service", Namespace:"default", Name:"balls", > UID:"f75f1f54-2c97-4417-946d-90a536087ad8", APIVersion:"v1", > ResourceVersion:"1776", FieldPath:""}): type: 'Warning' reason: > 'SyncLoadBalancerFailed' Error syncing load balancer: failed to ensure load > balancer: could not find network > > > When watching the logs of our management server, the request > *listNetworks *appears, > coming from the kubernetes IP. It does, however, include an empty *id > *parameter , > which in turn returns the error: > > { > "listnetworksresponse": { > "uuidList": [], > "errorcode": 431, > "cserrorcode": 9999, > "errortext": "Unable to execute API command listnetworks due to > invalid value. Invalid parameter id value= due to incorrect long value > format, or entity does not exist or due to incorrect parameter annotation > for the field in api cmd class." > } > } > > The request: http://*domain*/client/api?apiKey=*key*&command=listNetworks& > *id=*&response=json&signature=*signature* > > Looking at the code of cloudstack-kubernetes-provider > (cloudstack_loadbalancer.go:417), it seems like the error should return > *... **could not find network [network ID]*, but in our case, no ID shows > up (it could be nil?). > It appears that cs.verifyHosts (cloudstack_loadbalancer.go:100) is failing > to update lb.networkID, which cascades into this error. > > Seeing as it shows up even after creating different clusters, could this > still be a configuration issue, or is it a known bug in CKS? > > Thanks in advance, > Pierre Le Fevre >
