how to ssh into nodes of Google container engine cluster?

Viewed 15689

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?

2 Answers

I also faced same issue and after googling few houres founf this workaround.

add firewall rule as below:

Target Tags: tags of GKE nodes

Source IP range : 35.235.240.0/20 (Cloud IAP's TCP netblock see https://cloud.google.com/iap/docs/using-tcp-forwarding)

Port: 22

Then I tired below command

gcloud compute ssh [node name] --zone=[zone]

Related