mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Merge pull request #1270 from bigchaindb/edit-docs-re-ssh-to-k8s-nodes
Revised docs re/ SSHing to nodes in a k8s cluster
This commit is contained in:
commit
a09af2455d
@ -127,38 +127,53 @@ You can SSH to one of the just-deployed Kubernetes "master" nodes
|
|||||||
$ ssh -i ~/.ssh/<name>.pub ubuntu@<master-ip-address-or-hostname>
|
$ ssh -i ~/.ssh/<name>.pub ubuntu@<master-ip-address-or-hostname>
|
||||||
|
|
||||||
where you can get the IP address or hostname
|
where you can get the IP address or hostname
|
||||||
of a master node from the Azure Portal.
|
of a master node from the Azure Portal. For example:
|
||||||
|
|
||||||
The "agent" nodes don't get public IP addresses or hostnames,
|
.. code:: bash
|
||||||
|
|
||||||
|
$ ssh -i ~/.ssh/mykey123.pub ubuntu@mydnsprefix.westeurope.cloudapp.azure.com
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
All the master nodes should have the *same* IP address and hostname
|
||||||
|
(also called the Master FQDN).
|
||||||
|
|
||||||
|
The "agent" nodes shouldn't get public IP addresses or hostnames,
|
||||||
so you can't SSH to them *directly*,
|
so you can't SSH to them *directly*,
|
||||||
but you can first SSH to the master
|
but you can first SSH to the master
|
||||||
and then SSH to an agent from there
|
and then SSH to an agent from there.
|
||||||
(using the *private* IP address or hostname of the agent node).
|
To do that, you could
|
||||||
To do that, you either need to copy your SSH key pair to
|
copy your SSH key pair to the master (a bad idea),
|
||||||
the master (a bad idea),
|
or use SSH agent forwarding (better).
|
||||||
or use something like
|
To do the latter, do the following on the machine you used
|
||||||
`SSH agent forwarding <https://yakking.branchable.com/posts/ssh-A/>`_ (better).
|
to SSH to the master:
|
||||||
|
|
||||||
|
|
||||||
Optional: Set up SSH Forwarding
|
|
||||||
-------------------------------
|
|
||||||
|
|
||||||
On the system you will use to access the cluster, run
|
|
||||||
|
|
||||||
.. code:: bash
|
.. code:: bash
|
||||||
|
|
||||||
$ echo -e "Host <FQDN of the cluster from Azure Portal>\n ForwardAgent yes" >> ~/.ssh/config
|
$ echo -e "Host <FQDN of the cluster from Azure Portal>\n ForwardAgent yes" >> ~/.ssh/config
|
||||||
|
|
||||||
To verify whether SSH Forwarding works properly, login to the one of the master
|
To verify that SSH agent forwarding works properly,
|
||||||
machines and run
|
SSH to the one of the master nodes and do:
|
||||||
|
|
||||||
.. code:: bash
|
.. code:: bash
|
||||||
|
|
||||||
$ echo "$SSH_AUTH_SOCK"
|
$ echo "$SSH_AUTH_SOCK"
|
||||||
|
|
||||||
If you get an empty response, SSH forwarding hasn't been set up correctly.
|
If you get an empty response,
|
||||||
If you get a non-empty response, SSH forwarding should work fine and you can
|
then SSH agent forwarding hasn't been set up correctly.
|
||||||
try to login to one of the k8s nodes from the master.
|
If you get a non-empty response,
|
||||||
|
then SSH agent forwarding should work fine
|
||||||
|
and you can SSH to one of the agent nodes (from a master)
|
||||||
|
using something like:
|
||||||
|
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
$ ssh ssh ubuntu@k8s-agent-4AC80E97-0
|
||||||
|
|
||||||
|
where ``k8s-agent-4AC80E97-0`` is the name
|
||||||
|
of a Kubernetes agent node in your Kubernetes cluster.
|
||||||
|
You will have to replace it by the name
|
||||||
|
of an agent node in your cluster.
|
||||||
|
|
||||||
|
|
||||||
Optional: Delete the Kubernetes Cluster
|
Optional: Delete the Kubernetes Cluster
|
||||||
|
Loading…
x
Reference in New Issue
Block a user