Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to ssh into nodes of Google container engine cluster?

how to ssh into nodes of Google container engine cluster? When i try ssh to the node using its ip address it says public key denied.

Can some one help me how to get the key to connect to nodes of google container cluster?

like image 853
Jaikumar Ganesan Avatar asked Jun 29 '17 11:06

Jaikumar Ganesan


People also ask

How do I ssh into a container in Google Kubernetes cluster?

If your endgoal is to get remote SSH access to your private Kubernetes cluster nodes or pods, then you have 2 options: Option# 1: Install and run an OpenSSH server inside your docker container pod. SSH server listens on port 22 and you need to expose that to the outside network.

How do I log into node in Kubernetes?

Kubernetes nodes can be accessed similar way how we ssh into other linux machines. Just try ssh with the external ip of that node and you can login into it that way.

How do I access Gke cluster from outside?

create a dedicated IAM service account. create kube config with tokens for both clusters by doing gcloud container clusters get-credentials clusterA and gcloud container clusters get-credentials clusterB. use that kube config file in client-go via BuildConfigFromFlags on clusterA.


1 Answers

You should use gcloud tool e.g:

gcloud compute ssh <NODE_NAME> --zone <ZONE> 
like image 110
username1366 Avatar answered Nov 15 '22 05:11

username1366