Hi @Meersa,
You can try the following:
- Get the token of your customer:
TOKEN=$(az account get-access-token --query 'accessToken' -o tsv)
- Set the configurations of the AKS cluster, you can refer to this link for more details:
cat << EOF > body.json
{
"location": "eastus",
"identity": {
"type": "SystemAssigned"
},
"properties": {
"kubernetesVersion": "",
"dnsPrefix": "dnsprefix1",
"agentPoolProfiles": [
{
"name": "nodepool1",
"count": 1,
"vmSize": "Standard_DS2_v2",
"osType": "Linux",
"type": "VirtualMachineScaleSets",
"mode": "System"
}
],
"servicePrincipalProfile": {
"clientId": "msi"
}
}
}
EOF
- Create the AKS cluster using curl command with the generated token:
curl -d @body.json -H "Content-Type: application/json" -H "Authorization: Bearer ${TOKEN}" -X PUT 'https://management.azure.com/subscriptions/<subID>/resourceGroups/<ResourceGroupName>/providers/Microsoft.ContainerService/managedClusters/<AKSClusterName>?api-version=2023-05-01'
Note: Make sure to create the resource group.
Hope this helps, and please "Accept as Answer" if it helped, so that it can help others in the community looking for help on similar topics.