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.
Log in to the IBM Cloud console. From the menu bar, select the account that you want to use. , click Kubernetes. On the Clusters page, click the cluster that you want to access.
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
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.
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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With