Azure SQL Edge 容器的高可用性High availability for Azure SQL Edge containers

在 Kubernetes 中以原生方式创建并管理 Azure SQL Edge 实例。Create and manage your Azure SQL Edge instances natively in Kubernetes. 将 Azure SQL Edge 部署到由 Kubernetes 管理的 Docker 容器。Deploy Azure SQL Edge to docker containers managed by Kubernetes. 在 Kubernetes 中,具有 Azure SQL Edge 实例的容器可以在群集节点出现故障时自动恢复。In Kubernetes, a container with an Azure SQL Edge instance can automatically recover in case a cluster node fails. 可为 SQL Edge 容器映像 Kubernetes 配置永久性卷声明 (PVC)。You can configure the SQL Edge container image with a Kubernetes persistent volume claim (PVC). Kubernetes 会监视容器中的 Azure SQL Edge 进程。Kubernetes monitors the Azure SQL Edge process in the container. 如果进程、Pod、容器或节点发生故障,Kubernetes 将自动启动另一个实例,并重新连接到存储。If the process, pod, container, or node fail, Kubernetes automatically bootstraps another instance and reconnects to the storage.

Kubernetes 上的 Azure SQL Edge 容器Azure SQL Edge containers on Kubernetes

Kubernetes 1.6 及更高版本可支持存储类永久性卷声明Kubernetes 1.6 and later has support for storage classes, persistent volume claims.

在此配置中,Kubernetes 扮演容器业务流程协调程序一角。In this configuration, Kubernetes plays the role of the container orchestrator.

Kubernetes 群集中 Azure SQL Edge 的图示

在上图中,azure-sql-edgePod 中的容器。In the preceding diagram, azure-sql-edge is a container in a pod. Kubernetes 协调群集中的资源。Kubernetes orchestrates the resources in the cluster. 副本集可确保在节点发生故障后自动恢复 Pod。A replica set ensures that the pod is automatically recovered after a node failure. 应用程序会连接到服务。Applications connect to the service. 在这种情况下,该服务表示负载均衡器,承载着 azure-sql-edge 发生故障后保持不变的 IP 地址。In this case, the service represents a load balancer that hosts an IP address that stays the same after failure of the azure-sql-edge.

在下图中,azure-sql-edge 容器发生了故障。In the following diagram, the azure-sql-edge container has failed. 作为业务流程协调程序,Kubernetes 可保证副本集中正常实例的计数正确,并根据配置启动新容器。As the orchestrator, Kubernetes guarantees the correct count of healthy instances in the replica set, and starts a new container according to the configuration. 业务流程协调程序会在同一节点上启动新 Pod,并且 azure-sql-edge 会重新连接到同一个永久性存储。The orchestrator starts a new pod on the same node, and azure-sql-edge reconnects to the same persistent storage. 该服务会连接到重新创建的 azure-sql-edgeThe service connects to the re-created azure-sql-edge.

Pod 出现故障后 Kubernetes 群集中的 Azure SQL Edge

在下图中,托管 azure-sql-edge 容器的节点发生了故障。In the following diagram, the node hosting the azure-sql-edge container has failed. 业务流程协调程序在不同的节点上启动新 Pod,并且 azure-sql-edge 重新连接到同一个永久性存储。The orchestrator starts the new pod on a different node, and azure-sql-edge reconnects to the same persistent storage. 该服务会连接到重新创建的 azure-sql-edgeThe service connects to the re-created azure-sql-edge.

节点出现故障后 Kubernetes 群集中的 Azure SQL Edge..

若要在 Kubernetes 中创建容器,请参阅在 Kubernetes 中部署 Azure SQL Edge 容器To create a container in Kubernetes, see Deploy a Azure SQL Edge container in Kubernetes

后续步骤Next steps

若要在 Azure Kubernetes Service (AKS) 中部署 Azure SQL Edge 容器,请参阅以下文章:To deploy Azure SQL Edge containers in Azure Kubernetes Service (AKS), see the following articles: