Optimizing storage deployment across multiple availability zones can minimize interruptions during application release and ensure the continuity of critical business systems and applications when various failures occur. This topic describes the recommended configurations for storage deployment across multiple availability zones.
Background information
Kubernetes simplifies the process of distributing and deploying applications. However, the abstraction of the underlying hardware logic makes it hard for users to perceive the specific hardware logic. This may result in unexpected situations and application release interruption. For example, an application is not deployed in the expected availability zones. The disk is invalid when a cloud disk is created. The disk type is not supported when an application is being mounted. A node affinity conflict occurs when an application is being scheduled.
When you deploy storage across multiple availability zones, you can specify availability zones for business deployment. This reduces failures caused by insufficient availability zone resources and minimizes the preceding issues to ensure stable business operations.
Usage instructions
The following content introduces the proven practices of VKE. To achieve the expected results and conform to the limits of VKE, you need to perform operations by following the solution described in this topic or on the recommended resources. If you want to use another solution, consult your account manager. Recommended configuration
The recommended configurations for storage deployment across multiple availability zones are as follows:
- A cluster includes three availability zones to ensure that node and storage resources meet business requirements.
- Cloud disks are used for persistent storage, which is more stable and provides higher data transmission bandwidth than FileNAS.
- High-availability cloud disks are used to prevent cloud disk mounting failures and single points of failure.
- When all nodes in the cluster's availability zones are unavailable, immediately provision the matching nodes.
- Make sure that the application can be evenly distributed across all availability zones and nodes.
Procedure
Step 1: Create a cluster that includes three availability zones
To deploy storage across multiple availability zones, we recommend creating a cluster with three availability zones. This ensures nodes, storage, and application resources are distributed across different zones, improving disaster recovery capability.
- In the left navigation bar, click Cluster. Click Create cluster and specify the required parameters.
- The following content outlines the key configuration items for this example scenario. You need to configure other items as needed. For details, see Creating clusters.
Step 2: Create node pools based on the recommended configurations
To deploy storage across multiple availability zones, each node is recommended to use a single availability zone. Therefore, when you create a node pool, make sure that each node pool corresponds to a different availability zone. In this scenario, create three availability zones, and each node pool occupies a different availability zone.
- In the left navigation bar of the cluster management page, click Nodes > Node pool.
- Click Create node pool in the upper-left corner of the node pool list. Select an appropriate node pool type based on your business requirements, and then click Confirm.
- On the Create node pool page, specify parameters related to the node pool based on your business requirements.
- The following content outlines the key configuration items for this example scenario. You need to configure other items as needed. For details, see Creating node pools.
Step 3: Create a StorageClass by using high-availability cloud disks
To deploy storage across multiple availability zones, we recommend using a dynamic PV of the cloud disk type.Cloud disk storage offers more stable performance and higher data transmission bandwidth.
- In the left navigation bar of the cluster management page, click Storage > StorageClass.
- Click Create with Yaml, enter the prepared YAML configuration, and then click Confirm to create the StorageClass.
tip
The following content provides a standard template for the configurations of a StorageClass. You can modify the configurations based on your business requirements.
The following content outlines the key configuration items for this example scenario. You need to configure other items as needed. For details, see Using EBS dynamic PVs. Step 4: Create an application and distribute it across different availability zones
To deploy storage across multiple availability zones, we recommend that you distribute an application to nodes in different availability zones to minimize interruptions during application release.
- In the left navigation bar of the cluster management page, click Workload > StatefulSet.
- Click Create with Yaml, enter the prepared YAML configuration, and then click Confirm to create the StatefulSet.
tip
The following content provides a standard template for the configurations of a StatefulSet. You can modify the configurations based on your business requirements.
The following content outlines the key configuration items for this example scenario. You need to configure other items as needed. For details, see Creating StatefulSets.