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?
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.
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.
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.
You should use gcloud tool e.g:
gcloud compute ssh <NODE_NAME> --zone <ZONE>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With