question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'Az aks create' gives 'resource type not found in Microsoft.ContainerService' error

See original GitHub issue

Related command az aks create -n $clustername -g $resourcegroupname

Describe the bug I am trying to create a cluster on my resource group(AkriTest). After creating the resource group, when I use the above cmdlet to create a cluster, it gives me (InvalidResourceType) The resource type could not be found in the namespace ‘Microsoft.ContainerService’ for api version ‘2022-07-01’. error.

leeyun@DESKTOP-53ORH8Q:/mnt/c/WINDOWS/system32$ az aks create -g AkriTest -n AkriCluster
(InvalidResourceType) The resource type could not be found in the namespace 'Microsoft.ContainerService' for api version '2022-07-01'.
Code: InvalidResourceType
Message: The resource type could not be found in the namespace 'Microsoft.ContainerService' for api version '2022-07-01'.
leeyun@DESKTOP-53ORH8Q:/mnt/c/WINDOWS/system32$ az aks create -g AkriTest -n AkriCluster --debug
cli.knack.cli: Command arguments: ['aks', 'create', '-g', 'AkriTest', '-n', 'AkriCluster', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
Enable VT mode.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x03EC82B0>, <function OutputProducer.on_global_arguments at 0x03FAF580>, <function CLIQuery.on_global_arguments at 0x03FCA1D8>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'aks': ['azure.cli.command_modules.acs']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name                  Load Time    Groups  Commands
cli.azure.cli.core: acs                       0.281         5        45
cli.azure.cli.core: Total (1)                 0.281         5        45
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name                  Load Time    Groups  Commands  Directory
cli.azure.cli.core: Total (0)                 0.000         0         0
cli.azure.cli.core: Loaded 5 groups, 45 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command  : aks create
cli.azure.cli.core: Command table: aks create
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x05FC7A48>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\leeyun\.azure\commands\2022-12-08.13-34-16.aks_create.20752.log'.
az_command_data_logger: command args: aks create -g {} -n {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x05FE8DA8>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x06214418>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x062144F0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x03FAF5C8>, <function CLIQuery.handle_query_parameter at 0x03FCA220>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x062144A8>]
cli.azure.cli.command_modules.acs._validators: Use existing SSH public key file: C:\Users\leeyun\.ssh\id_rsa.pub
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=ContainerServiceClient
cli.azure.cli.core.auth.persistence: build_persistence: location='C:\\Users\\leeyun\\.azure\\msal_token_cache.bin', encrypt=True
cli.azure.cli.core.auth.binary_cache: load: C:\Users\leeyun\.azure\msal_http_cache.bin
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: openid_config = {'token_endpoint': 'https://login.windows-ppe.net/b80599ba-5ba5-403c-9ca6-39052658a3ab/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.windows-ppe.net/b80599ba-5ba5-403c-9ca6-39052658a3ab/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.windows-ppe.net/b80599ba-5ba5-403c-9ca6-39052658a3ab/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft-ppe.com/oidc/userinfo', 'authorization_endpoint': 'https://login.windows-ppe.net/b80599ba-5ba5-403c-9ca6-39052658a3ab/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.windows-ppe.net/b80599ba-5ba5-403c-9ca6-39052658a3ab/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.windows-ppe.net/b80599ba-5ba5-403c-9ca6-39052658a3ab/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.windows-ppe.net/b80599ba-5ba5-403c-9ca6-39052658a3ab/kerberos', 'tenant_region_scope': 'NA', 'cloud_instance_name': 'windows-ppe.net', 'cloud_graph_host_name': 'graph.ppe.windows.net', 'msgraph_host': 'graph.microsoft-ppe.com', 'rbac_url': 'https://pas.windows-ppe.net'}
msal.application: Broker enabled? False
cli.azure.cli.command_modules.acs.base_decorator: The intermediate 'location' does not exist. Return default value 'None'.
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=ResourceManagementClient
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: openid_config = {'token_endpoint': 'https://login.windows-ppe.net/b80599ba-5ba5-403c-9ca6-39052658a3ab/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.windows-ppe.net/b80599ba-5ba5-403c-9ca6-39052658a3ab/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.windows-ppe.net/b80599ba-5ba5-403c-9ca6-39052658a3ab/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft-ppe.com/oidc/userinfo', 'authorization_endpoint': 'https://login.windows-ppe.net/b80599ba-5ba5-403c-9ca6-39052658a3ab/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.windows-ppe.net/b80599ba-5ba5-403c-9ca6-39052658a3ab/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.windows-ppe.net/b80599ba-5ba5-403c-9ca6-39052658a3ab/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.windows-ppe.net/b80599ba-5ba5-403c-9ca6-39052658a3ab/kerberos', 'tenant_region_scope': 'NA', 'cloud_instance_name': 'windows-ppe.net', 'cloud_graph_host_name': 'graph.ppe.windows.net', 'msgraph_host': 'graph.microsoft-ppe.com', 'rbac_url': 'https://pas.windows-ppe.net'}
msal.application: Broker enabled? False
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: 927702c1-ecfd-478b-9f57-905c04065dbb
cli.azure.cli.core.sdk.policies: Request URL: 'https://api-dogfood.resources.windows-int.net/subscriptions/7b99066d-f1c5-494f-932c-64be641b5e79/resourcegroups/AkriTest?api-version=2021-04-01'
cli.azure.cli.core.sdk.policies: Request method: 'GET'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '1099ef53-7740-11ed-a3d3-70a8d3512c95'
cli.azure.cli.core.sdk.policies:     'CommandName': 'aks create'
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '-g -n --debug'
cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.41.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.5 (Windows-10-10.0.22621-SP0)'
cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: This request has no body
urllib3.connectionpool: Starting new HTTPS connection (1): api-dogfood.resources.windows-int.net:443
urllib3.connectionpool: https://api-dogfood.resources.windows-int.net:443 "GET /subscriptions/<subscription>/resourcegroups/AkriTest?api-version=2021-04-01 HTTP/1.1" 200 213
cli.azure.cli.core.sdk.policies: Response status: 200
cli.azure.cli.core.sdk.policies: Response headers:
cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Content-Length': '213'
cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json; charset=utf-8'
cli.azure.cli.core.sdk.policies:     'Expires': '-1'
cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-reads': '14998'
cli.azure.cli.core.sdk.policies:     'x-ms-request-id': '9ac8e389-ba4f-4570-9c07-f573ae830bcf'
cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '9ac8e389-ba4f-4570-9c07-f573ae830bcf'
cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'NORTHEUROPE:20221208T213419Z:9ac8e389-ba4f-4570-9c07-f573ae830bcf'
cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies:     'X-Cache': 'CONFIG_NOCACHE'
cli.azure.cli.core.sdk.policies:     'X-MSEdge-Ref': 'Ref A: DD216071CBBB443AAA88029EF1CB504E Ref B: PDX31EDGE0120 Ref C: 2022-12-08T21:34:19Z'
cli.azure.cli.core.sdk.policies:     'Date': 'Thu, 08 Dec 2022 21:34:18 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"id":"/subscriptions/<subscription>/resourceGroups/AkriTest","name":"AkriTest","type":"Microsoft.Resources/resourceGroups","location":"westus","properties":{"provisioningState":"Succeeded"}}
cli.azure.cli.command_modules.acs.base_decorator: The intermediate 'snapshot' does not exist. Return default value 'None'.
cli.azure.cli.command_modules.acs.base_decorator: The intermediate 'snapshot' does not exist. Return default value 'None'.
cli.azure.cli.command_modules.acs.base_decorator: The intermediate 'snapshot' does not exist. Return default value 'None'.
cli.azure.cli.command_modules.acs.base_decorator: The intermediate 'snapshot' does not exist. Return default value 'None'.
cli.azure.cli.command_modules.acs.base_decorator: The intermediate 'snapshot' does not exist. Return default value 'None'.
cli.azure.cli.command_modules.acs.base_decorator: The intermediate 'snapshot' does not exist. Return default value 'None'.
cli.azure.cli.command_modules.acs.base_decorator: The intermediate 'subscription_id' does not exist. Return default value 'None'.
cli.azure.cli.command_modules.acs.base_decorator: The intermediate 'monitoring_addon_enabled' does not exist. Return default value 'False'.
cli.azure.cli.command_modules.acs.base_decorator: The intermediate 'ingress_appgw_addon_enabled' does not exist. Return default value 'False'.
cli.azure.cli.command_modules.acs.base_decorator: The intermediate 'virtual_node_addon_enabled' does not exist. Return default value 'False'.
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: d7f9e162-8ccd-47f5-8ce8-db5c30cf4beb
cli.azure.cli.core.sdk.policies: Request URL: 'https://api-dogfood.resources.windows-int.net/subscriptions/<subscription>/resourceGroups/AkriTest/providers/Microsoft.ContainerService/managedClusters/AkriCluster?api-version=2022-07-01'
cli.azure.cli.core.sdk.policies: Request method: 'PUT'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
cli.azure.cli.core.sdk.policies:     'Content-Length': '1794'
cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '1099ef53-7740-11ed-a3d3-70a8d3512c95'
cli.azure.cli.core.sdk.policies:     'CommandName': 'aks create'
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '-g -n --debug'
cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.41.0 azsdk-python-azure-mgmt-containerservice/20.3.0 Python/3.10.5 (Windows-10-10.0.22621-SP0)'
cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: {"location": "westus", "identity": {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": "", "dnsPrefix": "AkriCluste-AkriTest-7b9906", "agentPoolProfiles": [{"count": 3, "vmSize": "Standard_DS2_v2", "osDiskSizeGB": 0, "osType": "Linux", "enableAutoScaling": false, "type": "VirtualMachineScaleSets", "mode": "System", "orchestratorVersion": "", "upgradeSettings": {}, "enableNodePublicIP": false, "scaleSetPriority": "Regular", "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": -1.0, "nodeTaints": [], "enableEncryptionAtHost": false, "enableUltraSSD": false, "enableFIPS": false, "name": "nodepool1"}], "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDbvbPtAoEO/RmBAFEYIhrWzU332HRSoiJVC095kL+2e4Tbxg9dFvzQ/UCJmQPb5isQ7XjMmIVygupY49+NILEbMCl0ny9Bl+U9tZmSOzaJsLI5bpCjqJKUKhXHxKt2KMJO7bRPw+0+Y8yMuZhD/47c5t9alryw0swTcN3WX8/f1nlnMADbE3FSO16DRnzsIm6BwCJwXsH9xBU2v+zs2s7oVaARIstoggmWFapmUKnPTV5PODOxD1PWmejotICU7jzGObYtMPIIBUkVQOb2zmcsmWZJsnryM0TRwP1/Cusd2lSAokgxHTyseCb1W4FwrWYHtq8sgsdtDTfChX/3mvQ1jCdAT6dzuGxUAHqi94usEMXdjrr+IMieQIXS8CMDu0f+uO1/E/PdbVCOClrFraTCEmARaVesYTkci15zn5zCBEEq85IylGXaOleTxXrmc4MmByCs+WbOZSp8x+SEv+mqifhu+JUkTH/+xSwcCwT2rv7KMhF/myNepMQlUzYpxSiSZRdR4B758h6isAFjB0JvEkUqZo/3DrkQ1aiJUrbrU+oxaK/eii7q2pjs5JOT7D/+exkUIUfIhgpR9Pk0H0v7Bkapmyf+6biAVv0k7TF1/WXSM5C+MkhGOXb24SwRpb7LvyoOntJJp/lmQOU/9dmcoRQiiZceLQhO0MV0u/RRcQ== redmond\\leeyun@DESKTOP-53ORH8Q\n"}]}}, "addonProfiles": {}, "enableRBAC": true, "networkProfile": {"networkPlugin": "kubenet", "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", "dockerBridgeCidr": "172.17.0.1/16", "outboundType": "loadBalancer", "loadBalancerSku": "standard"}, "disableLocalAccounts": false, "storageProfile": {}}}
urllib3.connectionpool: Starting new HTTPS connection (1): api-dogfood.resources.windows-int.net:443
urllib3.connectionpool: https://api-dogfood.resources.windows-int.net:443 "PUT /subscriptions/<subscription>/resourceGroups/AkriTest/providers/Microsoft.ContainerService/managedClusters/AkriCluster?api-version=2022-07-01 HTTP/1.1" 404 165
cli.azure.cli.core.sdk.policies: Response status: 404
cli.azure.cli.core.sdk.policies: Response headers:
cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Content-Length': '165'
cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json; charset=utf-8'
cli.azure.cli.core.sdk.policies:     'Expires': '-1'
cli.azure.cli.core.sdk.policies:     'x-ms-failure-cause': 'gateway'
cli.azure.cli.core.sdk.policies:     'x-ms-request-id': 'a468ce53-1ce4-44eb-a2c1-ca7fcf5e434e'
cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': 'a468ce53-1ce4-44eb-a2c1-ca7fcf5e434e'
cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'NORTHEUROPE:20221208T213420Z:a468ce53-1ce4-44eb-a2c1-ca7fcf5e434e'
cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies:     'X-Cache': 'CONFIG_NOCACHE'
cli.azure.cli.core.sdk.policies:     'X-MSEdge-Ref': 'Ref A: 27797D742B0D45FEB8BC71C5529657C0 Ref B: PDX31EDGE0115 Ref C: 2022-12-08T21:34:20Z'
cli.azure.cli.core.sdk.policies:     'Date': 'Thu, 08 Dec 2022 21:34:20 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"error":{"code":"InvalidResourceType","message":"The resource type could not be found in the namespace 'Microsoft.ContainerService' for api version '2022-07-01'."}}
cli.azure.cli.core.util: azure.cli.core.util.handle_exception is called with an exception:
cli.azure.cli.core.util: Traceback (most recent call last):
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/acs/managed_cluster_decorator.py", line 5440, in create_mc
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/acs/managed_cluster_decorator.py", line 5418, in put_mc
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/util.py", line 720, in sdk_no_wait
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/tracing/decorator.py", line 73, in wrapper_use_tracer
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/mgmt/containerservice/v2022_07_01/operations/_managed_clusters_operations.py", line 1620, in begin_create_or_update
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/mgmt/containerservice/v2022_07_01/operations/_managed_clusters_operations.py", line 1483, in _create_or_update_initial
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/exceptions.py", line 107, in map_error
azure.core.exceptions.ResourceNotFoundError: (InvalidResourceType) The resource type could not be found in the namespace 'Microsoft.ContainerService' for api version '2022-07-01'.
Code: InvalidResourceType
Message: The resource type could not be found in the namespace 'Microsoft.ContainerService' for api version '2022-07-01'.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/acs/custom.py", line 500, in aks_create
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/acs/managed_cluster_decorator.py", line 5449, in create_mc
azure.cli.core.azclierror.ResourceNotFoundError: (InvalidResourceType) The resource type could not be found in the namespace 'Microsoft.ContainerService' for api version '2022-07-01'.
Code: InvalidResourceType
Message: The resource type could not be found in the namespace 'Microsoft.ContainerService' for api version '2022-07-01'.

cli.azure.cli.core.azclierror: (InvalidResourceType) The resource type could not be found in the namespace 'Microsoft.ContainerService' for api version '2022-07-01'.
Code: InvalidResourceType
Message: The resource type could not be found in the namespace 'Microsoft.ContainerService' for api version '2022-07-01'.
az_command_data_logger: (InvalidResourceType) The resource type could not be found in the namespace 'Microsoft.ContainerService' for api version '2022-07-01'.
Code: InvalidResourceType
Message: The resource type could not be found in the namespace 'Microsoft.ContainerService' for api version '2022-07-01'.
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x05FC7B68>]
az_command_data_logger: exit code: 3
cli.__main__: Command ran in 2.782 seconds (init: 0.759, invoke: 2.023)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3374 in cache
telemetry.check: Negative: The C:\Users\leeyun\.azure\telemetry.txt was modified at 2022-12-08 13:24:51.630140, which in less than 600.000000 s

To Reproduce

az provider register --namespace Microsoft.Kubernetes --wait
az provider register --namespace Microsoft.KubernetesConfiguration --wait

az extension add --upgrade --yes -n connectedk8s
az extension add --upgrade --yes --name k8s-extension

az group create -l $location -n $rgname
az aks create -n $privclustername -g $rgname

Environment summary “azure-cli”: “2.41.0”, “azure-cli-core”: “2.41.0”, “azure-cli-telemetry”: “1.0.8”, “extensions”: { “connectedk8s”: “1.3.6”, “k8s-configuration”: “1.6.0”, “k8s-extension”: “1.3.7” }

Issue Analytics

  • State:open
  • Created 9 months ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
leeyun53commented, Dec 12, 2022

@RakeshMohanMSFT I upgraded az-cli to the latest version, but it still gives me the same error.

image
0reactions
msftbot[bot]commented, Dec 20, 2022

Hi, we’re sending this friendly reminder because we haven’t heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don’t hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resource not found errors - Azure Resource Manager
Describes how to resolve errors when a resource can't be found. The error might occur when you deploy a Bicep file or Azure...
Read more >
Troubleshoot Azure Kubernetes Service cluster creation issues
This article outlines the basic troubleshooting methods to use if you can't create or deploy a Microsoft Azure Kubernetes Service (AKS) cluster ...
Read more >
"az aks list" gives "(ResourceGroupNotFound) Resource ...
I created an AKS cluster in an RG called "akstest-rg1". ... Now "az aks list" no longer errors, but it's not showing my...
Read more >
AKS Update via Azure CLI: doesn't find resource - MSDN
The Resource 'Microsoft.ContainerService/managedClusters/myVmName' under resource group 'myResourceGroup' was not found. Googling around showed ...
Read more >
Resource provider registration errors - Azure - Microsoft Learn
This error might happen when a resource is deployed that creates other supporting resources. For example, the resource in your template adds ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found