You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3. On the **Basics** tab, configure the following settings:
121
+
122
+
* **Kubernetes namespace**: Select **default**.
123
+
* **Service type**: Select **SQL Database**.
124
+
* **Connection name**: Use the connection name provided by Service Connector or enter your own connection name.
125
+
* **Subscription**: Select the subscription that includes the Azure SQL Database service.
126
+
* **SQL server**: Select your SQL server.
127
+
* **SQL database**: Select your SQL database.
128
+
* **Client type**: The code language or framework you use to connect to the target service, such as **Python**.
129
+
130
+
:::image type="content" source="media/tutorial-ask-sql/create-connection.png" alt-text="Screenshot of the Azure portal showing the form to create a new connection to a SQL database in AKS.":::
131
+
132
+
4. Select **Next: Authentication**. On the **Authentication** tab, select **Workload Identity** and choose one **User assigned managed identity**.
6. The Cloud Shell will be launched and execute the commands to create a connection. You may need to confirm some configuration changes during the command processing. Once command runs successfully, it will show connection information, and you can click refresh button in **Service Connector** pane to show the latest result.
135
+
136
+
### [Azure CLI](#tab/azure-cli)
137
+
138
+
Create a service connection to the SQL database using the [`az aks connection create sql`](/cli/azure/aks/connection/create#az-aks-connection-create-sql) command. You can run this command in two different ways:
139
+
140
+
* generate the new connection step by step.
141
+
142
+
```azurecli-interactive
143
+
az aks connection create sql
144
+
```
145
+
146
+
* generate the new connection at once. Make sure you replace the following placeholders with your own information: `<source-subscription>`, `<source_resource_group>`, `<cluster>`, `<target-subscription>`, `<target_resource_group>`, `<server>`, `<database>`, and `<***>`.
Now that you created a connection between your AKS cluster and the database, you need to retrieve the connection secrets and deploy them in your container.
0 commit comments