mateeyow
mateeyow

Reputation: 1356

Accidentally deleted my kubernetes config

I accidentally deleted my kubeconfig file having server on Google Cloud, how can I generate it back without destroying my cluster?

Upvotes: 0

Views: 3285

Answers (1)

Robert Bailey
Robert Bailey

Reputation: 18200

If you are running a cluster in Google Container Engine, you can run gcloud container clusters get-credentials CLUSTERNAME to create a new kubeconfig file locally.

If you used the GCE setup scripts to create your cluster, then your best bet is to copy a kubeconfig file off of a worker node onto your local machine.

Upvotes: 1

Related Questions