'Unable to connect to remote Kubernetes cluster
When I attempt to connect to a remote Kubernetes cluster with kubectl cluster-info
I am getting an error as in the image below :
Trying to curl the cluster also returns an error.
Kubectl is configured correctly on the Windows machine I am trying to connect from and I have added the kubeconfig file i got from the Admin to C:/Users/username/.kube (I created the .kube directory manually after installing kubectl via Chocolatey) :
I am not sure if the config file is even being picked by kubectl. Do I need to explicitly add the client certificates to the Windows trust chain? Is there a way to validate the config file I have against the cluster?
What am I missing?
Solution 1:[1]
The issue was to do with Windows local Admin account. My standard account does installations in elevated mode i.e using the Local Admin User. Hence the .kube directory should be created at C:\Users\local_admin_user.kube and the corresponding User variable set accordingly also.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Golide |