docs for draft connect detach mode

This commit is contained in:
fibonacci1729 2018-04-26 14:48:07 -06:00
Родитель 7efbcef86f
Коммит bfe7b7cf13
1 изменённых файлов: 24 добавлений и 0 удалений

Просмотреть файл

@ -158,3 +158,27 @@ Connect to multi-port:80 on localhost:9090
Connect to multi-port:81 on localhost:9191
<streaming logs from all containers in pod>
```
# Detaching from connect
Using the `--detach` flag in `draft connect` will spawn a new Draft process that exports
the tunnel connection environment to standard out. All flags, excluding `--detach` will be
propagated to the detached Draft process. A hidden `--export` flag is appended to this set
of flags which instructs Draft to export the connection environment. As a result, container
logs are lost if Draft is connected in detach mode.
Continuing with the examples above:
```
$ eval $(draft connect -p 8081:8080 -c go --detach)
$ curl localhost:8081
Hello World, I'm Golang!
```
> Note that re-executing `draft connect --detach` will establish a new tunnel. In addition, Draft
> does not track the state of detached Draft tunnel connections and it is the responsibility of
> the user to terminate detached Draft processes.
To illustate terminating a detached draft connection:
```
$ kill $(ps -a | grep -m1 draft | awk '{print $1}')
```