Attach / Detach an Agent

We can transfer an Agent from one ECN to another by detaching the Agent and attaching it to another ECN. Note: detaching an Agent will delete its connection with the Controller, and all microservices will be shut down.

iofogctl detach agent agent-1 -n namespace-1

To display all resources in detached state with the get command:

iofogctl get all --detached

Attach the Agent to another ECN / Namespace

iofogctl attach agent agent-1 -n namespace-2

If we have an Agent ready and running on a remote host, we can also attach it directly using host and SSH credentials:

iofogctl attach agent agent-1 --host 123.123.123.123 --user foo --port 22 --key ~/.ssh/id_rsa