Search
Join the Technical Preview Program
See how NVMe-oF removes iSCSI
bottlenecks in your HCI
The Best Hyperconverged
Infrastructure
(HCI) for Enterprise
ROBO, SMB & Edge
The Best Virtual SAN
for Enterprise ROBO, SMB & Edge

SQL Tools on a pod on AKS to manage your Azure SQL databases

  • July 27, 2021
  • 3 min read
Cloud and Virtualization Architect and Microsoft MVP. Florent specializes in public, private, and hybrid cloud ecosystems. An MCSE in Private Cloud, he provides technical leadership in Cloud and Datacenter Management. Florent delivers high-authority insights on Azure deployments, virtualization strategy, and optimizing enterprise-scale cloud infrastructure.
Cloud and Virtualization Architect and Microsoft MVP. Florent specializes in public, private, and hybrid cloud ecosystems. An MCSE in Private Cloud, he provides technical leadership in Cloud and Datacenter Management. Florent delivers high-authority insights on Azure deployments, virtualization strategy, and optimizing enterprise-scale cloud infrastructure.


If you want to manage/test connectivity to your private SQL server, that are using private endpoint for example, and without deploying a VM, installing SQL Server Management Studio and so on, you can use AKS to do this.

To start, deploy a pod that we will customize later:

kubectl apply -f https://k8s.io/examples/application/shell-demo.yaml

Connect to the pod itself:

kubectl exec -it shell-demo -- /bin/bash

Install sqlcmd tool:

apt-get update && apt-get install gnupg2

curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -

curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | tee /etc/apt/sources.list.d/msprod.list

apt-get update && apt-get install mssql-tools unixodbc-dev

ls /opt/mssql-tools/bin/sqlcmd*

ln -sfn /opt/mssql-tools/bin/sqlcmd /usr/bin/sqlcmd

wp-image-16954

Connect to your database server, with the following sql command, and your credentials:

kubectl exec -it shell-demo -- /bin/bash

sqlcmd -S starwind.database.windows.net -U starwind -P 'Demo2021!'

select name from sys.databases

go

wp-image-16955

This is very interesting to manage your databases, or to try a connection from a private AKS cluster to a SQL Server that is using a private endpoint connection for example.

Hey! Found Florent’s insights useful? Looking for a cost-effective, high-performance, and easy-to-use hyperconverged platform?
Taras Shved
Taras Shved StarWind HCI Appliance Product Manager
Look no further! StarWind HCI Appliance (HCA) is a plug-and-play solution that combines compute, storage, networking, and virtualization software into a single easy-to-use hyperconverged platform. It's designed to significantly trim your IT costs and save valuable time. Interested in learning more? Book your StarWind HCA demo now to see it in action!