Failure to get cluster config - IBM Cloud

5/9/2019

I have a cluster created on IBM Cloud that I can't access. When I try the following command

ibmcloud ks cluster-config mycluster

I get this response :

FAILED

{"incidentID":"4d426527e73acd83-CDG","code":"A0006","description":"The specified cluster could not be found. Target a region. If you're using resource groups, make sure that you target the correct resource group.","type":"Authentication","recoveryCLI":"To list the clusters you have access to, run 'ibmcloud ks clusters'. To check the resource group ID of the cluster, run 'ibmcloud ks cluster-get \u003ccluster_name_or_ID\u003e'. To list the resource groups that you have access, run 'ibmcloud resource groups'. To target the resource group, run 'ibmcloud target -g \u003cresource_group\u003e'. To target a region, run 'ibmcloud ks region-set'."}

I've tried to contact the IBM support team, but I still have no helpful answer to my issue. But when I try this to get the list of my clusters, it works, and I can see that my cluster actually exists.

I also tried all the commands from the JSON error message, but still it doesn't work.

ibmcloud ks clusters

From what I saw on IBM the ibmcloud ks cluster-config mycluster command is supposed to download the configuration file, but since it doesn't even find my cluster, I don't get anything.

Hopefully someone has had this issue before and/or can help me to figure it out, I'm running out of ideas.

UPDATE

I also tried

ibmcloud ks cluster-config --cluster mycluster

It returns the same JSON error message.

My OS is Ubuntu 16.04

UPDATE 2

Even though I managed to manually get the cluster config and deploy a "hello-world" app, all commands refering to the cluster such as ibmcloud ks workers <cluster_name_or_ID> and ibmcloud ks cluster-config <cluster_name_or_ID> still don't work, and I firmly believe there is no way to fully use IBM Cloud without these commands working correctly.

-- DanRob
ibm-cloud
kubernetes

6 Answers

8/14/2019

I lead the dev team for the above cli. We have a new version of the CLI out and you no longer have to init to a specific region. We now support a global view of the world and all regions. Can you give this a try again?

-- Jeff Sloyer
Source: StackOverflow

5/13/2020

I used cluster config (without the dash) and it worked for me. So my entire command was ibmcloud ks cluster config --cluster <cluster_name_or_ID>

-- RTK
Source: StackOverflow

7/10/2019

I have seen problems using ibmcloud ks cluster-config with free clusters in the eu-gb region. If this applies to you, try using the appropriate regional endpoint to see if it helps.

For example:

ibmcloud ks init --host https://eu-gb.containers.cloud.ibm.com

See https://cloud.ibm.com/docs/containers?topic=containers-regions-and-zones#regions_free

-- Richard Schofield
Source: StackOverflow

5/9/2019

The command for obtaining the cluster configuration is:

USAGE:
       ibmcloud ks cluster-config --cluster <cluster name or ID> [--admin] [--export] [--yaml] [--network] [--skip-rbac]

It seems you are omitting the --cluster part. I just checked and it gives the error message you are reporting.

ibmcloud ks clusters lists the clusters and their resource groups. Run ibmcloud target and check that the resource group matches the cluster's group. Else, run ibmcloud target -g the-resource-group to switch to it.

P.S.: Are you using the latest version of the ks plugin?

-- data_henrik
Source: StackOverflow

5/13/2019

Not a solution, but you could bypass the failing command by manually downloading and 'exporting' the kubeconfig. The download link can be found by going to your cluster in IBM Cloud, then under Access, it's part of the tutorial.

-- Anne de Jong
Source: StackOverflow

5/10/2019

Edit: I no longer think unique naming is the issue

Perhaps you should remake your cluster with a unique name (not "mycluster")

If I recall correctly I received an error when my cluster name was not unique. My colleague did not get this error when he created his cluster with the name "mycluster", but he's running into the same problem as you.

-- Anne de Jong
Source: StackOverflow