Why can't kubectl connect to my IBMcloud kubernetes-cluster?

6/3/2020

I have, via the IBMcloud portal, created a free-tier kubernetes cluster (version 1.17.6). <br> After this, I follow the 3 steps found under the 'connect via CLI'-section. <br> However, when trying to use any kubectl (below I try 'kubectl get nodes') command to interact with the cluster, I get the error shown below, when using both kubectl version 1.18 and 1.17.

Has anyone experienced this?

PS C:\Windows\system32> ibmcloud login -a cloud.ibm.com -r us-south -g Default
API endpoint: https://cloud.ibm.com

Email> ***

Password>
Authenticating...
OK

Targeted account *** Account (2168eb22840948ffad70b6c2394e524d) <-> 2091846

Targeted resource group Default

Targeted region us-south


API endpoint:      https://cloud.ibm.com
Region:            us-south
User:              ***.org
Account:           *** Account (2168eb22840948ffad70b6c2394e524d) <-> 2091846   
Resource group:    Default
CF API endpoint:
Org:
Space:
PS C:\Windows\system32> ibmcloud ks cluster config --cluster brbq5nrd0njtl05gt4ng
OK
The configuration for brbq5nrd0njtl05gt4ng was downloaded successfully.

Added context for brbq5nrd0njtl05gt4ng to the current kubeconfig file.
You can now execute 'kubectl' commands against your cluster. For example, run 'kubectl get nodes'.

PS C:\Windows\system32> kubectl config current-context
mycluster/brbq5nrd0njtl05gt4ng

PS C:\Windows\system32> kubectl get nodes
Unable to connect to the server: dial tcp 184.173.44.62:21185: connectex: No connection could be made because the target machine actively refused it.

PS C:\Windows\system32> kubectl17 get nodes
Unable to connect to the server: dial tcp 184.173.44.62:21185: connectex: No connection could be made because the target machine actively refused it.

PS C:\Windows\system32>
-- Toeffe
ibm-cloud
kubectl
kubernetes

0 Answers