docs
uk8s
Service Discovery
Service Management
Common Questions about ULB

Common Questions about ULB

1. How to distinguish whether to use ULB4 or ULB7?

Declare whether to use ULB4 or ULB7 through the value of service.beta.kubernetes.io/ucloud-load-balancer-vserver-protocol in service.metadata.annotations.

If the value is tcp or udp, use ULB4.

If it is http or https, use ULB7.

2. How to distinguish whether ULB7 is ALB

Determine whether it is alb by checking if service.beta.kubernetes.io/ucloud-load-balancer-listentype in service.metadata.annotations is application, or find the corresponding LB ID on the service and check whether it is in the application load balancing page on the LB product page of the console.

3. Why is the health check invalid for Vserver when using ULB4

  1. If the externalTrafficPolicy of svc is Local, this situation is normal, and the failed node means that the corresponding pod is not running
  2. Need to capture packets on the node tcpdump -i eth0 host <ulb-ip> to see if it's normal, replace ulb-ip with the actual ip of svc
  3. Check if the kube-proxy service on the node is normal systemctl status kube-proxy
  4. Execute iptables -L -n -t nat |grep KUBE-SVC and ipvsadm -L -n to see if the forwarding rule is issued normally

4. Why is the corresponding port of ULB4 not the port of NodePort

  1. The node of K8S has performed iptables forwarding for the port combination of ulb_ip+serviceport, so it does not go through nodeport
  2. If you are interested, you can execute iptables -L -n -t nat or ipvsadm -L -n on the node to view the corresponding rules

5. How do I delete a LoadBalancer type Service and keep the EIP?

Modify the Service type, change the original type: LoadBalancer to NodePort or ClusterIP, and then carry out the Service deletion operation, EIP and ULB would be preserved.

As this operation makes the EIP and ULB resources no longer managed by UK8S, you need to manually go to the ULB and EIP page to unbind and bind resources.

6. After changing the EIP of the packet forwarding ULB, it does not take effect in uk8s

If a Service in uk8s is bound to a packet forwarding type ULB, and the user manually changes the EIP of the ULB, it will be found that the new EIP cannot be used to access the Service.

This is because the cloudprovider component cannot listen to the changes of ULB and does not trigger the checking process to write the new EIP into iptables for forwarding.

If you encounter this problem, you can use the following command to restart cloudprovider to force the checking process after modifying the EIP:

kubectl -n kube-system rollout restart deploy cloudprovider-ucloud

Please note that it may take about 2 minutes to take effect after the restart.

7. The original ULB cannot be re-bound after the Service is re-bound

After the Service is re-bound to the ULB, the original ULB will have vserver residues. At this time, other Services binding the original ULB will report similar errors as follows:

Error syncing load balancer: failed to ensure load balancer: vserver(s) have already been created for one or more ports

If encountered, you need to manually clean up the vserver in the original ULB.

8. How to manually change the EIP of the ULB bound by Service

  1. On the ULB management page of the console, manually change the EIP of the corresponding ULB.
  2. In Service, add the service.beta.kubernetes.io/ucloud-load-balancer-id field and set it to the corresponding ULB ID.
  3. Wait for a while and observe whether the EIP related Annotation in Serivce is updated.

9. Does a LoadBalancer Service support multiple ports?

Support, UK8S will create a VServer for each ServicePort under service.spec.ports, and the VServer port is the Service port.

10. Does it support multiple protocols?

The current UK8S CloudProvider plugin version >= 19.05.3 supports both HTTP and HTTPS protocols at the same time, and the cloudprovider plugin version >= 24.03.5 also supports the mixed use of UDP and TCP protocols.

11. If a Loadbalancer creates an external network ULB and the user binds a new EIP on the ULB control panel page, will it be deleted?

Only accessing the ExternalIP of SVC can funnel traffic into the backend Pod, and accessing other EIPs is invalid. When deleting SVC, all EIPs will be deleted.

  • Company
  • ContactUs
  • Blog
Copyright © 2024 SurferCloud All Rights Reserved