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 cli error when trying to create an AKS cluster

See original GitHub issue

This is autogenerated. Please review and update as needed.

Describe the bug

The error is given by az cli task on Github Actions and I have reproduced it manually by passing "y | " to az aks command to avoid confirmation for: "It is highly recommended to use USER assigned identity (option --assign-identity) when you want to bring your ownsubnet, which will have no latency for the role assignment to take effect. When using SYSTEM assigned identity, azure-cli will grant Network Contributor role to the system assigned identity after the cluster is created, and the role assignment will take some time to take effect, see https://docs.microsoft.com/azure/aks/use-managed-identity, proceed to create cluster with system assigned identity? (y/N): "

Command Name az aks create

Errors:

The command failed with an unexpected error. Here is the traceback:

Traceback (most recent call last):
  File "/opt/az/lib/python3.8/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 658, in execute
    raise ex
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 721, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 692, in _run_job
    result = cmd_copy(params)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/command_modules/acs/custom.py", line 2023, in aks_create
    mc = aks_create_decorator.construct_default_mc_profile()
  File "/opt/az/lib/python3.8/site-packages/azure/cli/command_modules/acs/decorator.py", line 5879, in construct_default_mc_profile
    self.process_add_role_assignment_for_vnet_subnet(mc)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/command_modules/acs/decorator.py", line 5229, in process_add_role_assignment_for_vnet_subnet
    if not self.context.get_yes() and not prompt_y_n(
  File "/opt/az/lib/python3.8/site-packages/knack/prompting.py", line 71, in prompt_y_n
    return _prompt_bool(msg, 'y', 'n', default=default, help_string=help_string)
  File "/opt/az/lib/python3.8/site-packages/knack/prompting.py", line 79, in _prompt_bool
    verify_is_a_tty()
  File "/opt/az/lib/python3.8/site-packages/knack/prompting.py", line 28, in verify_is_a_tty
    raise NoTTYException()
knack.prompting.NoTTYException

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here…
  • az aks create --resource-group {} --name {} --location {} --enable-managed-identity --kubernetes-version {} --vnet-subnet-id {} --docker-bridge-address {} --network-plugin {} --dns-service-ip {} --service-cidr {} --node-count {} --enable-cluster-autoscaler --min-count {} --max-count {} --ssh-key-value {} --load-balancer-sku {} --debug

Expected Behavior

Environment Summary

Linux-5.17.5-76051705-generic-x86_64-with-glibc2.34, Pop!_OS 22.04 LTS
Python 3.8.13
Installer: DEB

azure-cli 2.36.0

Additional Context

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
enrique-palazueloscommented, May 19, 2022

No worries @yonzhan @RakeshMohanMSFT, I’ve just realized that it’s my fault. I had a commented line between parameters so the command wasn’t launched correctly. Once fixed it works correctly.

Sorry for the inconvenience.

0reactions
RakeshMohanMSFTcommented, May 18, 2022

@enrique-palazuelos can you please help us with the --debug trace of the command you are running?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot Azure Kubernetes Service cluster creation issues
Basic troubleshooting of AKS cluster creation issues ... To install kubectl by using Azure CLI, run the az aks install-cli command.
Read more >
Unable to create AKS Cluster using CLI - Stack Overflow
1 Answer 1 · Please Check the resource group exists before creating the cluster. · Please move the id_rsa and id_rsa.pub files under...
Read more >
Create Azure AKS Cluster using AZ AKS CLI - STACKSIMPLIFY
Create Azure AKS Cluster using AZ AKS CLI¶. Step-01: Introduction¶. Design a Production grade cluster using command line; az aks cli ...
Read more >
Kubernetes on Microsoft Azure Kubernetes Service (AKS)
Pick the subscription you want to use for creating the cluster, and set that as your default. If you only have one subscription...
Read more >
Bad Request for url (error 400) in AKS | Tom's Notes
It was all good until I got to the part of creating the AKS cluster with Azure CLI – I was using Windows...
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