Fleet Management
Last updated
Last updated
Fleet Management is a feature that helps group Kubernetes clusters across multiple zones/regions , allowing flexible traffic management between clusters. When using Global Load Balancer (GLB) , there are two main traffic distribution mechanisms:
North-South Traffic Management with GLB
How it works : A single GLB will route traffic to clusters by geographic region (eg: HAN, HCM...), helping to optimize performance and reduce costs compared to using multiple individual Load Balancers.
Support for clusters with Network Type: ✅ Calico Overlay ✅ Cilium Overlay ✅ Cilium VPC Native
East-West Traffic Management with GLB
How it works : If a backend service in a cluster fails, traffic will failover to the backends of other clusters in the fleet , ensuring no downtime .
Only supports clusters with Network Type : ✅ Cilium VPC Native
Follow these instructions to create a Fleet and manage traffic distribution with GLB:
Step 1: Log in to VKS Portal at the link: https://vks.console.vngcloud.vn/overview
Step 2: Select Fleet Management
Step 3: Select Create a fleet
Step 4: Enter a memorable name for the fleet in the Fleet Name field . The Fleet name must be between 5 and 50 characters long, including the characters a-z, 0-9, '-'
Step 5: Select the Region containing your Cluster
Step 6: Select the cluster list you want to add to the fleet and select Register .
Step 7: In the list of added Clusters , you need to specify a cluster as host . The remaining Clusters will be members . For example, in the picture, I specify the cluster named demo-fleet-03 as host and the cluster named demo-cluster-04 as member.
Step 8: Select the type of Traffic flow you want, depending on the Network type of the cluster you have selected, the type of Traffic flow you can choose will be displayed accordingly.
Step 9: Select Create
Step 10: Deploy a service on the host cluster.
With Traffic Flow: East West Traffic Management with Multi Cluster Service : you can create service type LoadBalancer, NodePort or ClusterIP.
With Traffic Flow: North South Traffic Management with GLB : you can create service type LoadBalance or NodePort .
For example below, I create an nginx service of type LoadBalancer at namespace default:
Step 11: Create GLB service via the following sample YAML:
Step 12: Apply GLB configuration using command:
Replace glb-nginx.yaml
with your YAML file name.
Step 13: Check the status of GLB with the command:
You will see a list of created GLBs along with their status.
For example:
Step 14: Get the IP address or hostname of GLB to access the service using the command:
You will see the External IP or hostname section, this is the address to access the service from outside.
For example:
Step 15: Test Fleet's performance by sending a request to GLB:
Replace <EXTERNAL-IP>
with the IP address or hostname obtained from the step above.
For example:
Or access directly as picture:
Step 16: Test failover by shutting down the backend service in one cluster and observing how traffic is distributed to another cluster in the Fleet:
Test Traffic Flow MCS (East-West):
Then, test GLB access again to confirm that traffic has been routed to the other cluster.
Coming soon
Test North-South Traffic with GLB:
Coming soon
After completing the above steps, you have successfully set up Fleet Management on VKS with Global Load Balancer to effectively manage traffic between clusters.
After creating a Fleet, you can add existing Kubernetes clusters to the Fleet in two ways:
Method 1: In Fleet Management , select Edit Fleet then select a cluster from the available list and click "Register" to add to Fleet.
Method 2: Register the cluster directly to Fleet during the cluster creation process.
If you no longer need a cluster in Fleet, you can Unregister it by:
Step 1: Access the Fleet Management section .
Step 2: Select the cluster to remove.
Step 3: Click "Remove" or "Unregister" (only delete cluster from Fleet, not delete cluster from VKS system).
Once you create a Fleet, you can edit its configuration:
Change Host Cluster in existing Fleet.
Add or remove cluster members as needed, but always ensure Fleet has at least one cluster host.
When you no longer need a Fleet, you can delete it by:
Step 1: Access Fleet Management .
Step 2: Select the Fleet to delete.
Step 3: Click "Delete" and confirm.
Deleting a Fleet does not delete the clusters within it .
Attention:
Each Fleet needs to have at least one host cluster , the remaining clusters will act as member clusters . You can add or remove member clusters after the Fleet has been created.
Each cluster can only belong to one Fleet at a time.
A cluster cannot be deleted if it is a host cluster in a Fleet. The host role must be transferred to another cluster before deletion.
If you want to use Private cluster for Fleet, you need to create NAT so that the clusters can connect to GLB because we currently do not support Private Endpoint to GLB.
Deleting a Fleet does not delete the clusters within it.