gebeurtenis
31 mrt, 23 - 2 apr, 23
De grootste SQL-, Fabric- en Power BI-leerevenement. 31 maart – 2 april. Gebruik code FABINSIDER om $ 400 te besparen.
Zorg dat u zich vandaag nog registreertDeze browser wordt niet meer ondersteund.
Upgrade naar Microsoft Edge om te profiteren van de nieuwste functies, beveiligingsupdates en technische ondersteuning.
Applies to:
SQL Server - Linux
This quickstart takes you through the steps to deploy SQL Server on Linux containers to Azure Kubernetes Service (AKS) with Helm charts, from a Windows client machine.
AKS is a managed Kubernetes service for deploying and managing container clusters. Helm is an open-source packaging tool that helps you install and manage the lifecycle of Kubernetes applications.
An Azure subscription. If you don't have an Azure subscription, you can create a free account.
Download and review the sample Helm chart for this quickstart. The sample chart contains many configuration options for customizing your SQL Server deployment.
On your Windows client machine, you need the following tools.
If you prefer to use a different client operating system, you need to select the appropriate packages for that platform.
You use kubectl to interact with the Kubernetes cluster. For more information, see az aks install-cli.
To install kubectl, run the following command from your Windows command prompt:
az aks install-cli
Tip
You can add kubectl to your local PATH
environment variable, so that you don't have to type in the full path each time.
You need to merge the context of the AKS cluster, so that kubectl or helm commands run on that specific AKS cluster.
To merge, run the command as described in the Connect to AKS cluster article:
az aks get-credentials --resource-group <resourcegroupname> --name <aks clustername>
You should see the following output, where <clustername>
is the cluster you provided, and <username>
is your local Windows user account:
Merged "<clustername>" as current context in C:\Users\<username>\.kube.config
Confirm that the merge was successful by running kubectl get nodes
. The output should show the nodes in the context of your AKS cluster.
NAME STATUS ROLES AGE VERSION
<aks-node>-vmss000000 Ready agent 141d v1.16.13
<aks-node>-vmss000001 Ready agent 141d v1.16.13
You're now ready to deploy the SQL Server on AKS cluster via the Helm chart.
This quickstart provides a sample "as-is" sample "as-is" Helm chart. The sample is for reference only. Remember to review the readme
file to understand the configuration values that match your configuration requirements.
If you want to deploy SQL Server in StatefulSet mode, which is the recommended mode for SQL Server deployments, you can view a sample "as-is" StatefulSet-based Helm chart deployment instead.
Download the sample Helm chart.
Switch to the directory where you downloaded the sample chart, and modify the values.yaml
file if needed.
Deploy SQL Server using the following command. The deployment name is customizable, so you can change mssql-latest-deploy
to anything that you'd like.
helm install mssql-latest-deploy . --set ACCEPT_EULA.value=Y --set MSSQL_PID.value=Developer
In the previous example, the chart and its files are in the current directory, represented by the period (.
). You can specify the path of the chart if you prefer.
If successful, you see similar output:
NAME: mssql-latest-deploy
LAST DEPLOYED: Wed Apr 06 21:36:19 2022
NAMESPACE: default
STATUS: deployed
REVISION: 1
Deploying to a Kubernetes cluster can take a few minutes. To verify that your deployment was successful, run the following command:
kubectl get all
If successful, you see similar output:
NAME READY STATUS RESTARTS AGE
pod/mssql-latest-deploy-7f8c7f5bc-9grmg 1/1 Running 0 2m56s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/kubernetes ClusterIP 10.0.0.1 <none> 443/TCP 141d
service/mssql-latest-deploy LoadBalancer 10.0.247.220 20.40.0.145 1433:30780/TCP 2m56s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/mssql-latest-deploy 1/1 1 1 2m56s
NAME DESIRED CURRENT READY AGE
replicaset.apps/mssql-latest-deploy-7f8c7f5bc 1 1 1 2m56s
You can connect to the SQL Server instance using any familiar SQL Server client tool, such as SQL Server Management Studio (SSMS), Azure Data Studio, or sqlcmd.
For example, if you connect to the SQL Server instance using SSMS, you can use the following settings:
External-IP
address for the mssql-latest-deploy
service. In this example, it's 20.40.0.145
.sa
, which is the system administrator account.sa
password matches the value you provided in the MSSQL_SA_PASSWORD
configuration option, in the values.yaml
file of the Helm chart.Once you connect, you can expand the SQL Server instance in Object Explorer.
If you're not going to continue using your AKS cluster, remember to delete your cluster.
gebeurtenis
31 mrt, 23 - 2 apr, 23
De grootste SQL-, Fabric- en Power BI-leerevenement. 31 maart – 2 april. Gebruik code FABINSIDER om $ 400 te besparen.
Zorg dat u zich vandaag nog registreertTraining
Module
Begeleide project: toepassingen implementeren in Azure Kubernetes Service - Training
Welkom bij deze interactieve vaardighedenvalidatie-ervaring. Als u deze module voltooit, kunt u zich voorbereiden op het implementeren en beheren van containers met Azure Kubernetes Service-evaluatie.
Certificering
Microsoft Certified: Azure Database Administrator Associate - Certifications
Beheer een SQL Server-databaseinfrastructuur voor cloud-, on-premises en hybride relationele databases met behulp van de relationele Microsoft PaaS-databaseaanbiedingen.
Documentatie
SQL Server-containers implementeren in Kubernetes met StatefulSets - SQL Server
Dit artikel bevat aanbevolen procedures en richtlijnen voor het uitvoeren van SQL Server Linux-containers in Kubernetes met StatefulSets.
Omgevingsvariabelen configureren voor SQL Server in Linux - SQL Server
In dit artikel wordt beschreven hoe u omgevingsvariabelen gebruikt om specifieke SQL Server-instellingen in Linux te configureren.
Sql Server Linux-containers beveiligen - SQL Server
Krijg inzicht in de verschillende manieren om LINUX-containers van SQL Server te beveiligen en hoe u containers kunt uitvoeren als verschillende niet-hoofdgebruikers op de host.