Getting "permission denied" during az aks get-credentials
See original GitHub issueEnvironment 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:
- Created 6 years ago
- Reactions:1
- Comments:32 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We have released the new update. It has version number 2.0.21. Get the new MSI at https://aka.ms/InstallAzureCliWindows.
We are releasing early next week.