Access existing/old kuberenetes cluster or via kubectl command from a new machine

5/5/2017

I have already made a cluster which is running in AWS cloud with 1 master and 5 nodes. Unfortunately the computer(mac book) that I launched the cluster broke down so now I dont know how to access that old cluster with my new computer(mac book) and new kubernetes/kubectl environment in it.

-- Prata
amazon-web-services
cluster-computing
kubectl
kubernetes

1 Answer

5/5/2017

You should be able to ssh to the master (API server) through your AWS account credentials.

From the master, you can try a couple approaches -- see https://kubernetes.io/docs/admin/authentication/ for a list of authentication methods that can be used in your cluster. Most convenient would probably be to locate the --client-ca-file argument that is being passed to your kube-apiserver process, and use that certificate authority private key to generate a new client cert.

Once you have a new client cert you can regenerate your kubeconfig using this guide: https://lukemarsden.github.io/docs/user-guide/sharing-clusters/.

This is probably going to be a bit hairy! Good luck.

-- Symmetric
Source: StackOverflow