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.

Getting "permission denied" during az aks get-credentials

See original GitHub issue

Environment summary

Shell: Powershell Installed via MSI az --version 2.0.20

Getting permission denied when running az aks get-credentials command. Powershell is being run as administrator

PS C:\Users\admin> az aks get-credentials --resource-group Kubernetes-RG --name=Kubernetes-Cluster
[Errno 13] Permission denied: 'D:\\temp\\tmpl34_mzlt'
Traceback (most recent call last):
  File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\main.py", line 36, in main
    cmd_result = APPLICATION.execute(args)
  File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\core\application.py", line 212, in execute
    result = expanded_arg.func(params)
  File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\core\commands\__init__.py", line 377, in __call__
    return self.handler(*args, **kwargs)
  File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\core\commands\__init__.py", line 620, in _execute_command
    reraise(*sys.exc_info())
  File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\six.py", line 693, in reraise
    raise value
  File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\core\commands\__init__.py", line 602, in _execute_command
    result = op(client, **kwargs) if client else op(**kwargs)
  File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\command_modules\acs\custom.py", line 1288, in aks_get_credentials
    merge_kubernetes_configurations(path, additional_file.name)
  File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\command_modules\acs\custom.py", line 829, in merge_kubernetes_configurations
    with open(addition_file) as stream:
PermissionError: [Errno 13] Permission denied: 'D:\\temp\\tmpl34_mzlt'

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:32 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
derekbekoecommented, Nov 14, 2017

We have released the new update. It has version number 2.0.21. Get the new MSI at https://aka.ms/InstallAzureCliWindows.

3reactions
derekbekoecommented, Nov 8, 2017

We are releasing early next week.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Kubernetes Error when running "az aks get-credentials ...
In my case to refresh recently granted credentials helped this one: az account set --subscription "your current subscription name".
Read more >
Limit access to kubeconfig in Azure Kubernetes Service (AKS)
The az aks get-credentials command lets you get the access credentials for an AKS cluster and merges them into the kubeconfig file.
Read more >
Aks Minimum Permissions - Steve Griffith
In order to use kubectl you will need to get your cluster credentials. Azure will provide these to you using the az aks...
Read more >
PIPE microsoft/azure-aks-deploy:1.0.1 - ERROR
INFO: retrieve the kube config via the azure cli az aks get-credentials ... --overwrite-existing ERROR: [Errno 13] Permission denied: '.kube' Traceback ...
Read more >
First encounters with creating a Managed Kubernetes Cluster ...
az aks get-credentials -g resourcegroup -n clustername. I got an Permission Denied Error from python. It could not write the KubeCtl config
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