Accidentally deleted my kubernetes config

3/31/2016

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

-- mateeyow
kubernetes

1 Answer

3/31/2016

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.

-- Robert Bailey
Source: StackOverflow