Multi-Cluster App Delivery
This section will introduce how to use KubeVela for multi-cluster application delivery and why.
#
IntroductionThere are more and more situations come out that organizations need multi-cluster technology for application delivery:
- For scalability, a single Kubernetes cluster has its limit around 5K nodes or less, it is unable to handle the large scale application load.
- For stability/availability, application can deploy in multi-cluster for backup which provides more stability and availability.
- For security, you may need to deploy in different zones/areas as government policy requires.
The following guide will the multi-cluster that helps you easily deploy an application to different environments.
#
PreparationYou can simply join an existing cluster into KubeVela by specify its KubeConfig like below.
It will use field context.cluster
in KubeConfig as the cluster name automatically,
you can also specify the name by --name
parameter. For example:
After clusters joined, you could list all clusters managed by KubeVela currently.
You can also detach a cluster if you're not using it any more.
If there's still any application running in the cluster, the command will be rejected.
#
Deploy Application to multi clusterKubeVela regards a Kubernetes cluster as an environment, so you can deploy an application into one or more environments.
Below is an example, deploy to a staging environment first, check the application running well, and finally promote to production environment.
For different environments, the deployment configuration can also have some nuance. In the staging environment, we only need one replica for the webservice and do not need the worker. In the production environment, we setup 3 replicas for the webservice and enable the worker.
After the application deployed, it will run as the workflow steps.
You can refer to Env Binding and Health Check policy user guide for parameter details.
It will deploy application to staging environment first, you can check the Application
status by:
We can see that the workflow is suspended at manual-approval
:
You can also check the health status in the status.service
field below.
You can use resume
command after everything verified in statging cluster:
Recheck the Application
status:
All the step status in workflow is succeeded:
#
More use casesKubeVela can provide many strategies to deploy an application to multiple clusters by composing env-binding policy and workflow steps.
You can have a glimpse of how does it work as below:
More use cases about the multi cluster application deployment are coming soon.