There has been some complaint about the inconvenience of BackendGroup
, including:
- When someone wants to register multiple Pod ports to load balancers, multiple
BackendGroup
must be created because there is only one port can be specified in theBackendGroup
- It's not uncommon to register given Pods to multiple load balancers, in such scenario, multiple pairs of
LoadBalancer
andBackendGroup
must be created
- Substitute
loadBalancers
forlbName
inBackendGroup.spec
, backends (Pods/Service NodePort/Static) will be registered to every load balancer inBackendGroup.spec.loadBalancers
- For
BackendGroup
of typepods
, users may specify multiple ports inBackendGroup.spec.ports
portNumber
is deprecated, use port
instead.
apiVersion: tke.cloud.tencent.com/v1beta1
kind: BackendGroup
metadata:
name: my-bg
spec:
loadBalancers:
- my-load-balancer-1
- my-load-balancer-2
pods:
ports:
- port: 80
protocol: TCP
- port: 90
protocol: UDP
byLabel:
app: my-web-server