Scenario
You can use the feature for sharing the same CLB among multiple Services to support the simultaneous opening of TCP and UDP on the same port for the same VIP.
Note
This feature is not recommended for other scenarios.
Notes
For TKE clusters created before Aug. 17, 2020, the CLBs created by their Services support the sharing of the same CLB by default.
For TKE clusters created after Aug. 17, 2020, the feature of multiple Services sharing the same CLB is disabled by default.
If you need to reuse CLB instances for Services, submit a ticket for application. If it is a TKE Serverless cluster, the CLB sharing is enabled by default. Notes:
1.1 Only CLB instances purchased manually can be reused, and those purchased automatically by a serverless cluster cannot. If those purchased automatically are reused, an error will be reported. This is to protect them from being repossessed by the serverless cluster.
1.2 The following two annotations must be added to the Service once the CLB is purchased:
service.kubernetes.io/qcloud-share-existed-lb:"true"
service.kubernetes.io/tke-existed-lbid:lb-xxx
The management and sync of configurations between Service and CLB instances are based on the resource object of the LoadBalancerResource
type named the CLB ID. Do not perform any operations on this CRD; otherwise, the Service may fail.
Use Limits
In Service reuse scenarios, the number of listeners managed by a CLB instance is subject to the TOTAL_LISTENER_QUOTA
of the CLB instance. For more information, see DescribeQuota. In scenarios where a Service is reused, only the user-created Cloud Load Balancer (CLB) can be used. This is because when the CLB created in the TKE cluster is reused, CLB resources may not be released, leading to a resource leak.
Note
After reusing CLB resources created by the current TKE, you need to manually manage the CLB resources, because the CLB's life cycle will not be controlled by the TKE due to the lack of the tag.
Directions
3. Repeat Step 2 to share the same CLB among multiple Services.
Apakah halaman ini membantu?