Overview
Many tasks related to operating a Kubernetes cluster deployed via Konvoy require an operator to connect via SSH.This article will show you how to find the external IP of your Konvoy nodes and SSH into them.
Please note that these instructions were tested with Konvoy 1.6.1 using default AMI settings, connecting from a client machine running CentOS 7.9.
Finding a node's external IP via the Kubernetes dashboard
First, find the address and credentials of your Konvoy ops-portal:./konvoy get ops-portal
This will give you the URL that you need to enter into a web browser to reach the ops portal. Once you do that, click "Launch Console" then log in using the provided credentials reach the Konvoy Ops Portal.
Once you're there, click "Dashboard" under "Kubernetes" to reach the Kubernetes Dashboard.
On the left menu, click "Nodes". Find the node you need to connect to and click it.
Under the heading "Resource information", there should be an "ExternalIP" field. That is the IP address you'll need to use for an SSH connection from outside the cloud provider network.
Authenticating and opening the SSH connection
Open your terminal and navigate to the directory where you run Konvoy commands from.Add the SSH key that was generated when you created the cluster, which is located in this directory. It should have the same name as the directory, and end in .pem. So, for instance, in my example, I can add my key with:
ssh-add konvoy_v1.6.1-ssh.pemCheck your cluster.yaml to find the username that you will need to connect as. In this file there is a heading called "sshCredentials", and a value under that called "user". This should be "centos" if you're using a default cluster.yaml, but it may be different for you.
Open the SSH connection. Combine the username you got from your cluster.yaml file with the IP address you got from the Kubernetes dashboard:
ssh centos@10.10.10.10
This should open an SSH connection to your node, so you can perform whatever operations you needed to do.