Azure / aksArc

# Welcome to the Azure Kubernetes Service on Azure Stack HCI repo This is where the AKS-HCI team will track features and issues with AKS-HCI. We will monitor this repo in order to engage with our community and discuss questions, customer scenarios, or feature requests. Checkout our projects tab to see the roadmap for AKS-HCI!
MIT License
109 stars 45 forks source link

[BUG] Get-AksHciCredential fails with "cannot find the path specified" error #269

Open in3xes opened 1 year ago

in3xes commented 1 year ago

Describe the bug The Get-AksHciCredential command is failing when executed from a different admin user than the one used for installing AksHci. The command is supposed to create a .kube directory and place the config file. But the command fails with the following error:

Error: open C:\Users\<user>\.kube\config: The system cannot find the path specified.

To Reproduce Steps to reproduce the behavior:

  1. Install AKSHCI
  2. Create a Target Cluster
  3. Login into the machine with another admin user (Multi-Admin feature)
  4. Run Get-AksHciCredential -Name $clusterName

Expected behavior Get-AksHciCredential should be able to create a .kube directory in the user's home directory and place the config in the directory.

Fix The solution to this problem is to create a .kube directory in the user's home directory. The following command can be used to create the directory.

mkdir "$HOME/.kube"

After this step, Get-AksHciCredential should not fail.

leslielin-5 commented 1 year ago

The TSG has been published here: https://learn.microsoft.com/en-us/azure/aks/hybrid/known-issues-security#get-akshcicredential-fails-with--cannot-find-the-path-specified--error