This is part 2 of the “BDC series.” You can read part 1 here. This blog post will go into creating the Azure Kubernetes Service (AKS) cluster. If you’d like to stay updated, without doing the heavy work, feel free to register for my newsletter. I will email out blog posts of my journey down the wonderful road of BDCs.
I have recorded an UPDATED VERSION using the latest version of Azure Data Studio (1.13.0), you can watch the video below:
Let’s get started:
First, log into the VM (that was created in part 1) and then open Powershell (run as admin) and type: az login
This will log you into your Azure subscription. Next, we will create a resource group by executing the following command:
az group create –name nameOfMyresourceGroup –location eastus2
Once you execute the above command, you can go into the Azure portal and refresh your resource group pane and see the newly created resource group.
Once that is setup, it’s time to create the actual Kubernetes cluster.
az aks create –name nameOfCluster –resource-group nameOfMyresourceGroup –generate-ssh-keys –node-vm-size Standard_L8s –node-count 1 –kubernetes-version 1.12.8
You can run the below version via Azure CLI:
az aks create --name nameOfCluster \ --resource-group nameOfMyresourceGroup \ --generate-ssh-keys \ --node-vm-size Standard_L8s \ --node-count 1 \ --kubernetes-version 1.12.8
Now a couple things to note regarding the above command:
The name is whatever you want it to be. For “–resource-group” make sure you put the one you created in the first step above. For “–node-vm-size” the default is Standard_L8s. I experienced issues when I first tried to create it so I chose a different SKU. I went with Standard_DS5_v2.
(If you end up having problems finding a SKU, try running this command in the Azure CLI to help you find available SKUs in a particular region:
Get-AzComputeResourceSku | where {$_.Locations.Contains("westus")};
Running the above command will give you a list of SKUs in the ‘westus2’ region and will tell you whether they are available or not.)
For “–node-count”, 1 is fine if you want to just test but for real production environments you would want this at a much higher count. Having a node count of 1 means all the Kubernetes pods will reside on one VM (i.e. not redundant at all). When I ran my AKS cluster build earlier I chose a node count of 3. But for the sake of this series, stick with node count of one. Also, a benefit of going with AKS is that the master node is handled by AKS, so you don’t have to worry about that. The node count is only referring to the “worker nodes.” Regarding, “–kubernetes-version 1.12.8”, it’s wise to get the latest supported version of Kubernetes by AKS by running the command below:
Get-AzComputeResourceSku | where {$_.Locations.Contains(“westus”)};
az aks get-versions --location eastus --output table
This will output the available versions that can be installed. You can read more about it here.
Time To Connect
Once the above command finished I ran the below command to import credentials so that I can connect via Azure CLI:
az aks get-credentials –resource-group=nameOfMyresourceGroup –name nameOfCluster
az aks get-credentials --resource-group=nameOfMyresourceGroup --name nameOfCluster
Then I verify the connection to the cluster by running: kubectl get nodes
As I mentioned above, I chose a node count of 3 and in the above screenshot you see 3 nodes. If you chose a node count of 1, you’d just see one node in the results. If encounter any issues building the AKS cluster, feel free to reach out to me. Part 3 continues by creating the Big Data Cluster on top of the AKS cluster we created in part 2. Enjoy!
4 Replies to “How to Setup SQL Server Big Data Cluster in Azure (AKS) – Part 2”