frankd
frankd

Reputation: 1413

kops validate cluster: returns "cluster not found" even though cluster is healthy and kubectl works fine

I created a cluster using kops. It worked fine and the cluster is healthy. I can see my nodes using kubectl and have created some deployments and services. I tried adding a node using "kops edit ig nodes" and got an error "cluster not found". Now I get that error for all kops commands:

kops validate cluster
Using cluster from kubectl context: <clustername>

cluster "<clustername>" not found

So my question is: where does kops look for clusters and how do I configure it to see my cluster.

Upvotes: 1

Views: 3471

Answers (2)

frankd
frankd

Reputation: 1413

My KOPS_STATE_STORE environment variable got messed up. I corrected it to be the correct s3 bucket and everything is fine.

export KOPS_STATE_STORE=s3://correctbucketname

Upvotes: 2

Suresh Vishnoi
Suresh Vishnoi

Reputation: 18373

Kubectl and Kops access the configuration file from the following the location.

When the cluster is created.The configuration will be saved into a users

$HOME/.kube/config 

I have attached the link for further insight for instance, If you have another config file you can EXPORT it. kube-config

Upvotes: 0

Related Questions