Hi, I have an AKS cluster that need to be stopped daily. What are my options to automate this, I tried Automate Account on Azure, created a powershell script, scheduled it. But after the process, my cluster was actually in failed state, I had to reconcile, I'm not sure what caused it. If this is a one time issue, I can still use it since it is the best and simple cost effective way. Can anyone confirm the cause of this issue and suggest if there are more simple ways. I will attach the script here. Thank You.
Error message: An internal error occurred. This is usually some internal issue that you cannot fix on your side. If the error persists, please contact AKS support.
Script:
$resourceGroup = "xyz"
$aksName = "abc"
Connect-AzAccount -Identity
Stop-AzAksCluster -ResourceGroupName $resourceGroup -Name $aksName