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”: []
}
}
]
}
]
}
}