cancel
Showing results for 
Search instead for 
Did you mean: 

Kubectl config Error

Hemanth2406
Explorer
0 Kudos
1,284

Hi All,

I have installed kubectl CLI in Windows 10 Laptop and installed kubelogin. I followed all steps mentioned in setting and configuring kubectl for Kyma tutorial in Discovering Kubernetes .

After installing KubeConfig file in ./kube folder when i try to run 

kubectl cluster-info am getting below error

E1217 20:09:08.178329 7056 memcache.go:265] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.
E1217 20:09:08.181377 7056 memcache.go:265] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.
E1217 20:09:08.184684 7056 memcache.go:265] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.
E1217 20:09:08.185733 7056 memcache.go:265] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.
E1217 20:09:08.186730 7056 memcache.go:265] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.

 

I am using trail SAP BTP account. Please help me to resolve this issue. Thanks in advance.

Margit_Wagner
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @Hemanth2406 
I have forwarded you inquiry to teh respective team. Please expect a delay in the reply.
Kind regards
Margit

Accepted Solutions (0)

Answers (1)

Answers (1)

msgeissler
Explorer
0 Kudos

Hey,

are you sure your Kubernetes config file is in the right place?
Should be 

<HOME OR USER DIRECTORY>/.kube/config

It looks like kubectl is trying to connect to a local Kubernetes instance.
Try something like 

kubectl config get-contexts

To see if your Kubernetes context shows up and is actually the default context.

Otherwise you could also use 

kubectl --kubeconfig <PATH TO YOUR CONFIG FILE> ...

if you do not wish to use your global config file.

 

Best regards,
Marcus