Skip to main content

Service type: Load Balancer

The Managed GPU Cluster product is developed from Kubernetes Native and integrates additional cloud provider components into Kubernetes, such as the FPT Cloud ControllerManager. This component is designed to manage worker nodes within the cluster and load balancer services. You can expose your application to the internet for user access using various methods, including creating an ingress for the service, creating the service as a NodePort, attaching a floating IP to a worker node, or using a load balancer service.

FPT Cloud supports creating load balancer services with the following options:

KeyValueDefaultPurpose
service.beta.kubernetes.io/fpt-load-balancer-internal"true"/"false""false"Set to "true" if you do not want to expose the service to the internet
loadbalancer.fptcloud.com/keep-floatingip"true"/"false""false"Set to "true" if you want to retain the floating IP in the VPC after deleting the LoadBalancer service
loadbalancer.fptcloud.com/proxy-protocol"true"/"false""false"Set to "true" if you want to use proxy protocol for the LoadBalancer. Note: proxy protocol can only be used with LoadBalancer layer 4.
loadbalancer.fptcloud.com/enable-health-monitor"true"/"false""true"Set to "false" if you want to disable the health monitor for the LoadBalancer pool.
service.beta.kubernetes.io/fpt-load-balancer-typeLBv1: basic/ advanced/ standard/ premium. LBv2: Basic-1/ Basic-2/ Standard/ Advanced/PremiumLbv1: "basic", LBv2: "Basic-1"Set the LoadBalancer flavor to meet the load of applications behind the LoadBalancer pool backend.
loadbalancer.fptcloud.com/enable-ingress-hostname"true"/"false""false"Set to "true" if you want to enable the ingress hostname for the LoadBalancer service type.
loadbalancer.fptcloud.com/load-balancer-version"v1"/"v2""v1"Set the value to "v2" if you want to use LBv2 for the LoadBalancer service type. If this annotation is not set, LBv1 is used by default.
loadbalancer.fptcloud.com/x-forwarded-for"true"/"false""false"Set to "true" if you want to forward the request header to the LoadBalancer pool backend when using LoadBalancer layer 7. Note: proxy protocol and x-forwarded-for cannot be used at the same time.

Additionally, Managed GPU Cluster allows you to perform the following configurations:

1. Create a LoadBalancer service type with a specified floating IP to attach to the load balancer

kind: Service
apiVersion: v1
metadata:
name: hello-world
namespace: example
spec:
type: LoadBalancer
loadBalancerIP: 103.160.90.207
selector:
app: hello-world
ports:
- name: http
protocol: TCP
port: 443
targetPort: web

Note: The public IP must be assigned to the VPC and be in an inactive state. You can check this under Networking -> Floating IPs.

2. Configure "loadBalancerSourceRanges" in the service "spec" to restrict access to the load balancer:

kind: Service
apiVersion: v1
metadata:
name: hello-world
namespace: example1
spec:
loadBalancerSourceRanges:
- 14.233.234.0/24
- 10.250.0.0/24
type: LoadBalancer
selector:
app: hello-world
ports:
- name: http
protocol: TCP
port: 80
targetPort: web

Note: The "loadBalancerSourceRanges" configuration contains an array of public IP ranges that are allowed to access the load balancer. By default, M-FKE creates a load balancer service type with an IP source range of 0.0.0.0/0.