Azure Lab not able to create AKS cluster

Getting this error even i kept all settings:

{
“error”: {
“code”: “InvalidTemplateDeployment”,
“details”: [
{
“code”: “RequestDisallowedByPolicy”,
“target”: “aks-lab”,
“message”: “Resource ‘aks-lab’ was disallowed by policy. Reasons: ‘Allowed VM sizes: Standard_D2s_v3, Standard_K8S2_v1, Standard_K8S_v1. Max agent pool: 2. Max node pool: 1. Container insights & alerting must be disabled. Update configuration to comply.’. See error details for policy resource IDs.”,
“additionalInfo”: [
{
“type”: “PolicyViolation”,
“info”: {
“evaluationDetails”: {
“evaluatedExpressions”: [
{
“result”: “True”,
“expressionKind”: “Field”,
“expression”: “type”,
“path”: “type”,
“expressionValue”: “Microsoft.ContainerService/managedClusters”,
“targetValue”: “Microsoft.ContainerService/managedClusters”,
“operator”: “Equals”
},
{
“result”: “False”,
“expressionKind”: “Field”,
“expression”: “Microsoft.ContainerService/managedClusters/agentPoolProfiles[].vmSize",
“path”: "properties.agentPoolProfiles[
].vmSize”,
“targetValue”: [
“Standard_D2s_v3”,
“Standard_K8S2_v1”,
“Standard_K8S_v1”
],
“operator”: “In”
}
],
“reason”: “Allowed VM sizes: Standard_D2s_v3, Standard_K8S2_v1, Standard_K8S_v1. Max agent pool: 2. Max node pool: 1. Container insights & alerting must be disabled. Update configuration to comply.”
},
“policyDefinitionId”: “/subscriptions/a2b28c85-1948-4263-90ca-bade2bac4df4/providers/Microsoft.Authorization/policyDefinitions/container_service_v2-tpm”,
“policySetDefinitionId”: “/subscriptions/a2b28c85-1948-4263-90ca-bade2bac4df4/providers/Microsoft.Authorization/policySetDefinitions/global-limits_a2b28c85-1948-4263-90ca-bade2bac4df4-tpm”,
“policyDefinitionReferenceId”: “container_service_v2-tpm_ref”,
“policySetDefinitionName”: “global-limits_a2b28c85-1948-4263-90ca-bade2bac4df4-tpm”,
“policySetDefinitionDisplayName”: “global-limits_a2b28c85-1948-4263-90ca-bade2bac4df4-tpm”,
“policySetDefinitionVersion”: “1.0.0”,
“policyDefinitionName”: “container_service_v2-tpm”,
“policyDefinitionDisplayName”: “container_service_v2-tpm”,
“policyDefinitionVersion”: “1.0.0”,
“policyDefinitionEffect”: “deny”,
“policyAssignmentId”: “/subscriptions/a2b28c85-1948-4263-90ca-bade2bac4df4/providers/Microsoft.Authorization/policyAssignments/global-limits_a2b28c85-1948-4263-90ca-bade2bac4df4-tpm”,
“policyAssignmentName”: “global-limits_a2b28c85-1948-4263-90ca-bade2bac4df4-tpm”,
“policyAssignmentDisplayName”: “global-limits_a2b28c85-1948-4263-90ca-bade2bac4df4-tpm”,
“policyAssignmentScope”: “/subscriptions/a2b28c85-1948-4263-90ca-bade2bac4df4”,
“policyAssignmentParameters”: {},
“policyExemptionIds”: [],
“policyEnrollmentIds”: []
}
}
]
}
],
“message”: “The template deployment failed because of policy violation. Please see details for more information.”
},
“details”: {
“code”: “InvalidTemplateDeployment”,
“message”: “The template deployment failed because of policy violation. Please see details for more information.”,
“details”: [
{
“code”: “RequestDisallowedByPolicy”,
“target”: “aks-lab”,
“message”: “Resource ‘aks-lab’ was disallowed by policy. Reasons: ‘Allowed VM sizes: Standard_D2s_v3, Standard_K8S2_v1, Standard_K8S_v1. Max agent pool: 2. Max node pool: 1. Container insights & alerting must be disabled. Update configuration to comply.’. See error details for policy resource IDs.”,
“additionalInfo”: [
{
“type”: “PolicyViolation”,
“info”: {
“evaluationDetails”: {
“evaluatedExpressions”: [
{
“result”: “True”,
“expressionKind”: “Field”,
“expression”: “type”,
“path”: “type”,
“expressionValue”: “Microsoft.ContainerService/managedClusters”,
“targetValue”: “Microsoft.ContainerService/managedClusters”,
“operator”: “Equals”
},
{
“result”: “False”,
“expressionKind”: “Field”,
“expression”: “Microsoft.ContainerService/managedClusters/agentPoolProfiles[].vmSize",
“path”: "properties.agentPoolProfiles[
].vmSize”,
“targetValue”: [
“Standard_D2s_v3”,
“Standard_K8S2_v1”,
“Standard_K8S_v1”
],
“operator”: “In”
}
],
“reason”: “Allowed VM sizes: Standard_D2s_v3, Standard_K8S2_v1, Standard_K8S_v1. Max agent pool: 2. Max node pool: 1. Container insights & alerting must be disabled. Update configuration to comply.”
},
“policyDefinitionId”: “/subscriptions/a2b28c85-1948-4263-90ca-bade2bac4df4/providers/Microsoft.Authorization/policyDefinitions/container_service_v2-tpm”,
“policySetDefinitionId”: “/subscriptions/a2b28c85-1948-4263-90ca-bade2bac4df4/providers/Microsoft.Authorization/policySetDefinitions/global-limits_a2b28c85-1948-4263-90ca-bade2bac4df4-tpm”,
“policyDefinitionReferenceId”: “container_service_v2-tpm_ref”,
“policySetDefinitionName”: “global-limits_a2b28c85-1948-4263-90ca-bade2bac4df4-tpm”,
“policySetDefinitionDisplayName”: “global-limits_a2b28c85-1948-4263-90ca-bade2bac4df4-tpm”,
“policySetDefinitionVersion”: “1.0.0”,
“policyDefinitionName”: “container_service_v2-tpm”,
“policyDefinitionDisplayName”: “container_service_v2-tpm”,
“policyDefinitionVersion”: “1.0.0”,
“policyDefinitionEffect”: “deny”,
“policyAssignmentId”: “/subscriptions/a2b28c85-1948-4263-90ca-bade2bac4df4/providers/Microsoft.Authorization/policyAssignments/global-limits_a2b28c85-1948-4263-90ca-bade2bac4df4-tpm”,
“policyAssignmentName”: “global-limits_a2b28c85-1948-4263-90ca-bade2bac4df4-tpm”,
“policyAssignmentDisplayName”: “global-limits_a2b28c85-1948-4263-90ca-bade2bac4df4-tpm”,
“policyAssignmentScope”: “/subscriptions/a2b28c85-1948-4263-90ca-bade2bac4df4”,
“policyAssignmentParameters”: {},
“policyExemptionIds”: [],
“policyEnrollmentIds”: []
}
}
]
}
]
}
}

It’s a bit tricky to create an AKS cluster on our playgrounds; please use this guide to help you navigate that.

1 Like

Hello @rob_kodekloud

I followed the docs, & it works. In kodeKloud cant we use Azure DevOps Org?? if the answer is NO, then what is the alternate way to use Azure devops org??

Thanks in advance

We don’t support it – it’s a costly service to provision, and a difficult service for us to secure as well.

It’s also on its way out at Azure. Microsoft bought Github, and has said that future development will be in Github, rather than in Azure Devops, which is a much smaller platform for Microsoft.

1 Like

Ok, thanks for the info…