In this article, I will be answering the question of how we can simply deploy Azure Managed Instance on the data controller we created in the previous section.
We will be using AZDATA to create a Managed Instance.
As the first step, we connect to the data controller with the following line of code.
1 |
azdata login -ns arc -u dmcarcadmin |
After successfully logging in, you can install SQL Managed Instance on kubernetes with the following line of code.
It can run fast or slow in kubernetes clusters of different sizes, but in my example, an Azure Managed instance was created in an average of 3 minutes.
1 |
azdata arc sql mi create -n dmcsqlmi |
If you want to set up Managed Instance with a little more adjustment or configuration, you can use the following lines of code.
cores-limit (-cl) : Determines the number of cores to be assigned to Azure Managed Instance.
cores-request (-cr) : It allows the number of cores to be assigned and the amount of request on a GB basis.
memory-limit (-ml): Allows the amount of memory to be assigned to be determined on a GB basis.
memory-request (-mr): Allows the amount of memory to be assigned to be determined on a GB basis.
path : It allows you to specify the path information of your special json files that you will use during the installation phase.
replicas : Specifies how many replicas should be.
storage-class-backups (-scb): Allows you to select a specific kubernetes storage class for your backups.
storage-class-data (-scd) : Lets you choose a specific kubernetes storage class for your data
storage-class-data-logs (-scdl) : Allows you to select a specific kubernetes storage class for your database log files.
storage-class-logs (-scl) : Allows you to select a specific kubernetes storage class for log files.
volume-size-backups (-vsb) : It determines the size of the backup disk.
volume-size-data (-vsd): Specifies the size of the database data disk.
volume-size-data-logs (-vsdl) : Allows you to determine the disk size of the database log files.
volume-size-logs (-vsl): Your log files allow you to determine the disk size.
dev: Allows you to specify whether the Managed Instance is for development.
We saw in the picture2 notification that Managed Instace was deployed. Let’s see the managed instance list with the following line of code.
1 |
azdata arc sql mi list |
As seen in Picture3, we can see the IP address, name, replica information and status that we will need to connect to Azure Managed Instance.
If we refresh the Data Controller screen in Azure Data Studio, we can see the Managed Instance we have created.

When you click on the Instance information you see in Picture4, you can see that it shows us the Azure Managed Instance IP address information that we can connect to via SQL Server Management Studio or Azure Data Studio.
You can also see the IP addresses of Managed Instance’s Kibana and Grafana services. You can easily monitor Managed Instance using both Kibana and Grafana.
From here, your user login information for Kibana and Grafana is the username and password you provided when creating the data controller.

Now that we have learned the IP address of Azure Managed Instance, let’s quickly connect via sqlcmd, create a new database and view it from Azure Data Studio.
1 |
sqlcmd -S 52.188.137.113,1433 -U dmcsqladmin -P YouMustEnterPassword! |
Let’s create a database with the following lines of code as we establish a connection and query the version information.

I quickly refresh the Managed Instance screen in Azure Data Studio to check that the database is created.

If you want to delete the Managed Instance we created, you can use the following line of code.
1 |
azdata arc sql mi delete -n dmcsqlmi |
Managed Instance has been deleted, but it should not be forgotten that pvc is left behind!
1 |
kubectl get pvc -n arc -o name | grep dmcsqlmi |
After we get the pvc list, we can use the following lines of code to perform the deletion.
1 2 |
kubectl delete pvc data-5eruizm8kaj9dh6uexk19c50-dmcsqlmi-0 -n arc kubectl delete pvc logs-5eruizm8kaj9dh6uexk19c50-dmcsqlmi-0 -n arc |