Cannot authenticate to kubectl using the CLI on Windows
Connecting your IBM® Cloud Private cluster to the kubectl command line by using the IBM Cloud Private command line fails on Windows™.
Symptoms
When you run the cloudctl login command and the following error is displayed:
Unable to rename file to bat extension: C:\Users\<your_account>`\.cloudctl\clusters\mycluster\kube-config
Where <your_account> is the name of your Windows account.
Causes
Windows is not correctly converting the kube-config file that the command downloads to a .bat file.
Resolving the problem
- Change the file name from
C:\Users\<your_account>\.cloudctl\clusters\mycluster\kube-configtoC:\Users\<your_account>\.bluemix\plugins\icp\clusters\mycluster\kube-config.bat. - Run the
C:\Users\<your_account>\.cloudctl\clusters\mycluster\kube-config.batfile. You can run kubectl commands against your cluster.