Hello lili zhang
First, let's review which deployments are currently present in your resource group—similar to checking a delivery history to confirm which packages have arrived. Then, use PowerShell on each node to verify their registration status.
Run this command in your terminal:
az deployment group list --resource-group rg-shipping-dronedelivery-eastus --output table
This will show you a list that looks something like this as an example below:
Name Timestamp State
main-20240829-123456 2024-08-29T12:34:56 Failed
cluster-deployment-abc123 2024-08-29T11:20:30 Succeeded
What we are looking for:
- Any deployment that shows "Succeeded" - that's a good one to use
- Any deployment that shows "Failed" - this might be your original attempt
- If the list is completely empty - your deployment never got created properly
Once you see the actual deployment names from above, pick the one that succeeded (or the most recent one) and use that name instead of "cluster-stamp".
For example, if you see a deployment called "main-20240829-123456", then run:
AKS_CLUSTER_NAME=$(az deployment group show --resource-group rg-shipping-dronedelivery-eastus -n main-20240829-123456 --query properties.outputs.aksClusterName.value -o tsv)
Replace "main-20240829-123456" with whatever name you actually see in your list.
If You Don't See Any Successful Deployments. If all your deployments show "Failed" or the list is empty, it means your original deployment didn't work.
Fix the original deployment command
az deploymeny group create...
Use this corrected version:
az deployment group create --resource-group rg-shipping-dronedelivery-eastus --template-file cluster-stamp.bicep --parameters @your-parameters-file.json --name cluster-deployment-$(date +%Y%m%d-%H%M%S)
I have changed below:
Fixed "deploymeny" to "deployment"
Added a unique name with timestamp so it won't conflict with previous attempts
Made sure you're pointing to your parameters file correctly
If you want to know why your deployment failed, you can check the error details:
az deployment operation group list --resource-group rg-shipping-dronedelivery-eastus --name [your-failed-deployment-name] --query "[?properties.provisioningState=='Failed'].properties.statusMessage"
This will tell you exactly what went wrong, like getting a detailed explanation of why your package couldn't be delivered.
The most important thing to remember is that "cluster-stamp" might not be the actual deployment name that Azure created. Azure often adds timestamps or uses different naming conventions, so always check what's actually there first.
Please refer Microsoft documentation for details
- Azure Resource Manager Deployment History https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/deployment-history?tabs=azure-portal
- Deploy Bicep files with Azure CLI: https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/deploy-cli
- Troubleshoot Bicep file deployments: https://learn.microsoft.com/en-us/azure/azure-resource-manager/troubleshooting/quickstart-troubleshoot-bicep-deployment?tabs=azure-cli
Kindly let us know if the suggested steps helps or you need further assistance on this issue.