Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit c9600a3

Browse files
committed
Adding a file to clear up a ToC anomoloy
1 parent dd6d124 commit c9600a3

2 files changed

Lines changed: 111 additions & 1 deletion

File tree

docs/linux/TOC.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
#### [Configure cross-platform (Windows and Linux)](sql-server-linux-availability-group-cross-platform.md)
9090
### [Containers with Kubernetes](sql-server-linux-containter-ha-overview.md)
9191
#### [Configure with shared disk](tutorial-sql-server-containers-kubernetes.md)
92-
#### [Configure with availability group](tutorial-sql-server-ag-kubernetes.md)
92+
#### [Configure with availability group](sql-server-ag-kubernetes.md)
9393
##### [Configure SQL Server specification (YAML)](sql-server-linux-kubernetes-spec.md)
9494
##### [Configure SQL Server Kubernetes operator](sql-server-linux-kubernetes-operator.md)
9595
##### [Failover primary replica with Kubernetes](sql-server-linux-kubernetes-failover-job.md)
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
---
2+
title: SQL Server availability group on Kubernetes cluster
3+
description: This article introduces availability groups on SQL Server containers
4+
author: MikeRayMSFT
5+
ms.author: mikeray
6+
manager: craigg
7+
ms.date: 6/10/2018
8+
ms.topic: article
9+
ms.prod: sql
10+
ms.component: ""
11+
ms.suite: "sql"
12+
ms.custom: "sql-linux"
13+
ms.technology: linux
14+
---
15+
16+
# Containerized SQL Server availability group
17+
18+
SQL Server vNext supports availability groups on containers in a Kubernetes. For availability groups, deploy the SQL Server [Kubernetes operator](http://coreos.com/blog/introducing-operators.html) to your Kubernetes cluster. The operator helps package, deploy, and manage the availability group in a cluster.
19+
20+
![AG in Kubernetes Container](media/tutorial-sql-server-ag-containers-kubernetes/KubernetesCluster.png)
21+
22+
In the image above, a four-node kubernetes clusters host an availability group with three replicas. The solution includes the following components:
23+
24+
* A Kubernetes [*deployment*](http://kubernetes.io/docs/concepts/workloads/controllers/deployment/). The deployment includes the operator and a configuration map. These provide the container image, software, and instructions required to deploy SQL Server instances for the availability group.
25+
26+
* Three nodes, each hosting a [*StatefulSet*](http://kubernetes.io/docs/concepts/workloads/controllers/statefulset/). The StatefulSet contains a [*pod*](http://kubernetes.io/docs/concepts/workloads/pods/pod-overview/). Each pod contains:
27+
* A SQL Server container running one instance of SQL Server.
28+
* An availability group agent.
29+
30+
* Two [*ConfigMaps*](http://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/) related to the availability group. The ConfigMaps provide information about:
31+
* The deployment for the operator.
32+
* The availability group.
33+
34+
* [*Persistent volumes*](http://kubernetes.io/docs/concepts/storage/persistent-volumes/) are pieces of storage. A *persistent volume claim* (PVC) is a request for storage by a user. Each container is affiliated with a PVC for the data and log storage. In Azure Kubernetes Service (AKS), you [create a persistent volume claim](http://docs.microsoft.com/azure/aks/azure-disks-dynamic-pv) to automatically provision storage based on a storage class.
35+
36+
37+
In addition, the cluster stores [*secrets*](http://kubernetes.io/docs/concepts/configuration/secret/) for the passwords, certificates, keys, and other sensitive information.
38+
39+
## Deploy the availability group in Kubernetes
40+
41+
To deploy an availability group in Kubernetes:
42+
43+
1. Create the Kubernetes cluster
44+
45+
For an availability group, create at least three nodes for SQL Server plus a node for the operator.
46+
47+
1. Deploy the operator
48+
49+
1. Configure the storage
50+
51+
1. Deploy the StatefulSet
52+
53+
The operator listens for instructions to deploy the StatefulSet. It automatically creates the instances of SQL Server on three separate nodes and configures the availability group with an external cluster manager.
54+
55+
1. Create the databases and attach them to the availability group
56+
57+
For detailed steps, see [Configure a SQL Server Always On availability group in Kubernetes for high availability](tutorial-sql-server-ag-kubernetes.md).
58+
59+
## SQL Server Kubernetes operator
60+
61+
After you deploy the operator, it registers a custom SQL Server resource. Use the operator to deploy this resource. Each resource corresponds to an instance of SQL Server and includes specific properties like `sapassword` and `monitoring policy`. The operator parses the resource and deploys a Kubernetes StatefulSet.
62+
63+
The StatfulSet contains:
64+
65+
* mssql-server container
66+
67+
* AG Agent container
68+
69+
The code for the operator, AG agent, and SQL Server is packaged in a Docker image called `mssql-server-k8s-agents`. This image contains following binaries:
70+
71+
* `mssql-server-k8s-operator`
72+
73+
This process is deployed as a separate Kubernetes deployment. It registers the custom Kubernetes [custom resource](http://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) called `SqlServer` (sqlservers.mssql.microsoft.com). Then it listens for such resources being created or updated in the Kubernetes cluster. For every such event, it creates or updates the Kubernetes resources for the corresponding instance (for example the StatefulSet, or `mssql-server-k8s-init-sql` job).
74+
75+
* `mssql-server-k8s-sqlhealth-agent`
76+
77+
This web server serves Kubernetes [liveness probes](http://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/) to determine the health of a SQL Server instance. Monitors the health of the local SQL Server instance by calling `sp_server_diagnostics` and comparing the results with your monitor policy.
78+
79+
* `mssql-server-k8s-ag-agent-supervisor`
80+
81+
This process spawns `mssql-server-k8s-ag-agent` processes as child processes and terminates them as necessary, based on which AGs the local SQL Server instance is meant to be part of.
82+
83+
* `mssql-server-k8s-ag-agent`
84+
85+
This process monitors the health of an AG replica on a single SQL Server instance and performs failovers.
86+
87+
* `mssql-server-k8s-init-sql`
88+
89+
This Kubernetes [job](http://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/) applies a desired state configuration to a SQL Server instance. The job is created by the operator every time a SqlServer resource is created or updated. It ensures that the target SQL Server instance corresponding to the custom resource has the desired configuration described in the resource.
90+
91+
For example, if any of the following settings are required, it completes them:
92+
* Update the SA password
93+
* Creates the SQL login for the agents
94+
* Creates the DBM endpoint
95+
96+
* `mssql-server-k8s-rotate-creds`
97+
98+
This Kubernetes job implements the rotate credentials task. Create this job to request updates to the SA password, agent SQL login password, DBM cert, etc. The SA password is specified as the job parameters. The others are auto-generated.
99+
100+
*`mssql-server-k8s-failover`
101+
102+
A Kubernetes job that implements the manual failover workflow.
103+
104+
### Notes
105+
106+
To deploy an AG in Kubernetes, define a SqlServer resource with the names of one or more AGs that the instance should be a part of.
107+
108+
Regardless of the AG configuration, The operator will always deploy the AG monitor. If the SqlServer resource does not list any AG, the operator will still deploy these containers.
109+
110+
The version for the operator image is identical to the version for the SQL Server image.

0 commit comments

Comments
 (0)