Load Balancer

What is NLB?

Overview

  • Network Load Balancer (NLB) is a load balancer provided by VNGCloud that helps distribute network traffic to multiple back-end servers in a computer group (instance group). NLB operates at layer 4 of the OSI model, providing load balancing based on IP addresses and TCP/UDP ports. For more detailed information about NLB, please refer to [How it works (NLB)]

Model deployment

What is ALB?

Overview

  • Application Load Balancer (ALB) is a tool in network and server infrastructure used to distribute network traffic to multiple servers or virtual machines to improve the performance and availability of applications. ALB operates at the application layer, allowing traffic distribution based on many factors such as request type, server state, and load distribution algorithm. ALB provides advanced routing capabilities, allowing traffic to be directed based on Host or Path Header. It also supports session persistence, which helps maintain user sessions to the same server. This is useful for applications that require consistency in user interactions. For more information about ALB, please refer to [How it works (ALB)]

Model deployment

VNGCloud LoadBalancer Controller

The VNG Cloud Load Balancer Controller simplifies the deployment and management of load balancers in VNG Cloud environments for Kubernetes clusters. It automates the creation, configuration, and lifecycle management of load balancers for Kubernetes services and ingress resources. The controller ensures seamless integration with VNG Cloud services, enabling dynamic load balancing, SSL termination, and efficient traffic routing. It continuously monitors and reconciles resources to maintain their desired state, ensuring high availability, scalability, and optimized performance for applications running on VNG Cloud.

Installation

Create Service Account and install VNGCloud LoadBalancer Controller

  • Create or use a service account created on IAM and attach policy: vLBFullAccess , vServerFullAccess . To create a service account, go here and follow these steps:

    • Select " Create a Service Account ", enter a name for the Service Account and click Next Step to assign permissions to the Service Account

    • Find and select Policy: vLBFullAccess and Policy: vServerFullAccess , then click "Create a Service Account" to create Service Account, Policy: vLBFullAccess and Policy: vServerFullAccess created by VNG Cloud, you cannot delete these policies.

    • After successful creation, you need to save the Client_ID and Secret_Key of the Service Account to perform the next step.

Install VNGCloud LoadBalancer Controller

  • Install Helm version 3.0 or higher. Refer to https://helm.sh/docs/intro/install/ for instructions on how to install.

  • Replace your ClientID an Client Secret information and run the following command:

helm install vngcloud-load-balancer-controller oci://vcr.vngcloud.vn/81-vks-public/vks-helm-charts/vngcloud-load-balancer-controller \
  --namespace kube-system \
  --set mysecret.global.clientID= __________________ \
  --set mysecret.global.clientSecret= __________________
  • After the installation is complete, check the status of pod:

kubectl -n kube-system get pod -l app.kubernetes.io/name=vngcloud-load-balancer-controller

For example, in the image below you have successfully installed vngcloud-controller-manager:

NAME                                                              READY   STATUS    RESTARTS   AGE
vngcloud-load-balancer-controller-1736217866-manager-77599vrxpz   1/1     Running   0          4h24m

Last updated