We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey,
While following the instruction as per below https://github.com/HoussemDellai/aks-keyvault/blob/master/commands-identity.ps1
when trying to retrieve existing identity
If using AKS with Managed Identity, retrieve the existing Identity
echo $existingIdentity, it will retrieve three entries as below
None None /subscriptions/xxxxxxxxxxxx/resourceGroups/MC_rg-demo01_aks-demo01_westeurope/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aks-demo01-agentpool None None westeurope None aks-demo01-agentpool None None None MC_rg-demo01_aks-demo01_westeurope None Microsoft.ManagedIdentity/userAssignedIdentities
None None /subscriptions/xxxxxxxxx/resourceGroups/MC_rg-demo01_aks-demo01_westeurope/providers/Microsoft.ManagedIdentity/userAssignedIdentities/kubedashboard-aks-demo01 None None westeurope None kubedashboard-aks-demo01 None None None MC_rg-demo01_aks-demo01_westeurope None Microsoft.ManagedIdentity/userAssignedIdentities
Idenity will throw error as below
$identity = az identity show -n $existingIdentity.name -g $existingIdentity.resourceGroup | ConvertFrom-Json az: error: unrecognized arguments: kubedashboard-aks-demo01 omsagent-aks-demo01 MC_rg-demo01_aks-demo01_westeurope MC_rg-demo01_aks-demo01_westeurope
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hey,
While following the instruction as per below
https://github.com/HoussemDellai/aks-keyvault/blob/master/commands-identity.ps1
when trying to retrieve existing identity
If using AKS with Managed Identity, retrieve the existing Identity
If ($isAKSWithManagedIdentity -eq "true") {
echo "Retrieving the existing Azure Identity..."
$existingIdentity = az resource list -g $aks.nodeResourceGroup --query "[?contains(type, 'Microsoft.ManagedIdentity/userAssignedIdentities')]" | ConvertFrom-Json
$identity = az identity show -n $existingIdentity.name -g $existingIdentity.resourceGroup | ConvertFrom-Json
}
echo $existingIdentity, it will retrieve three entries as below
None None /subscriptions/xxxxxxxxxxxx/resourceGroups/MC_rg-demo01_aks-demo01_westeurope/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aks-demo01-agentpool None None westeurope None aks-demo01-agentpool None None None MC_rg-demo01_aks-demo01_westeurope None Microsoft.ManagedIdentity/userAssignedIdentities
None None /subscriptions/xxxxxxxxx/resourceGroups/MC_rg-demo01_aks-demo01_westeurope/providers/Microsoft.ManagedIdentity/userAssignedIdentities/kubedashboard-aks-demo01 None None westeurope None kubedashboard-aks-demo01 None None None MC_rg-demo01_aks-demo01_westeurope None Microsoft.ManagedIdentity/userAssignedIdentities
None None /subscriptions/xxxxxxxxxxxxxx/resourceGroups/MC_rg-demo01_aks-demo01_westeurope/providers/Microsoft.ManagedIdentity/userAssignedIdentities/omsagent-aks-demo01 None None westeurope None omsagent-aks-demo01 None None None MC_rg-demo01_aks-demo01_westeurope None Microsoft.ManagedIdentity/userAssignedIdentities
Idenity will throw error as below
$identity = az identity show -n $existingIdentity.name -g $existingIdentity.resourceGroup | ConvertFrom-Json
az: error: unrecognized arguments: kubedashboard-aks-demo01 omsagent-aks-demo01 MC_rg-demo01_aks-demo01_westeurope MC_rg-demo01_aks-demo01_westeurope
The text was updated successfully, but these errors were encountered: