How to SSH into a Kubernetes Node or Server

anish anil picture anish anil · Jan 30, 2018 · Viewed 19k times · Source

How to SSH into a Kubernetes Node or Server hosted on AWS? I have hosted a Kubernetes Server and Node on AWS. I'm able to see the nodes and server from my local laptop with the kubectl get node command.

I need to create a persistent volume for my node but I'm unable to ssh into it.

Is there any specific way to ssh into the node or server?

Answer

Swapnil Pandey picture Swapnil Pandey · Jan 30, 2018

Try this: ssh -i <path of the private key file> admin@<ip of the aws kube instances>

The perm file should be in $HOME/.ssh/kube_rsa