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.
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?
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>
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
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?
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.
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.