Azure Cli Aks Install Cli Permission Denied and Sudo Does Not Work

Azure CLI aks install cli permission denied and sudo does not work

You do not need to install the kubectl for AKS if you use the Azure Cloud Shell, that's a default tool installed in it. See all the default tools installed in Azure Cloud Shell.

So you should take a look at the list if you want to install a tool in the Azure Cloud Shell.

And permissions are set as regular users without sudo access. Any installation outside your $Home directory is not persisted. So you cannot execute the sudo command in it.

Cannot install Azure Dev Spaces using cloud shell in AKS

The error shows why the issue happens. It cannot find the command azds. Because the cloud shell does not install the command tool. You can find all the command tools installed in the cloud shell here.

I suggest you can install the tool which you need in the Azure VM of the azure Kubernetes, if you do not find the tool what you want.

It's a better way for you. By the way, the Cloud Shell just enables access to a browser-based command-line experience built with Azure management tasks in mind. So install the Azure CLI in the VM is a better experience.

azure-cli | mkdir: cannot create directory | Permission denied

It's likely that you are running the command as a non-root user. To gain root permissions for a single command, invoke the command with sudo, e.g. sudo mkdir /usr/local/hyperledger. I don't think this is the solution to your problem though.

You shouldn't need to run these steps manually if your target environment is AKS. You should be preparing a docker image to run in your cluster, rather than using shell commands to modify a VM/container.

The author of the article has provided a Dockerfile which you can use to build a docker image, or you can retrieve the pre-built image from Docker Hub: tsmatz/hyperledger-dev.

Azure Kubernetes Error when running az aks get-credentials command

Well, I see the comment, and you already get the solution. So I just can explain the difference to you. Hope it will help you!

When you use the command az aks get-credentials without parameter --admin, it means the CLI command uses the default value: Cluster user. And when you use the cluster user, it just works if you integrate AKS with the AAD. But you said you just have the AKS Cluster Admin Operator role, so the appropriate parameter is --admin. You can get more details here.

And on my side, it's a little dangerous. If the AKS cluster is just for the test, there is no problem. But if it's for production, I recommend you integrate with the AAD, and then give the appropriate permissions to the user. Because the admin user means you have all the permissions, you know, it's not safe.



Related Topics



Leave a reply



Submit